class CMySplitterWnd : public CSplitterWnd
重载
return true;

解决方案 »

  1.   

    具体是那个鼠标动作,click 还是 BUTTONDOWN
      

  2.   

    派生CSplitterWnd类,重载其OnSetCursor(return true),MouseMove、LButtonDown(直接返回),然后用这个类来创建分割窗口
      

  3.   

    WM_LBUTTONDOWN,WM_LBUTTONUP,WM_MOUSEMOVE
      

  4.   

    to:san_huo(煽风点火)
       dongfa(阿东)
       ysdesigned(清泉)
       stevenW(无情的雨) 
    多谢了各位了
    我现在知道应该重载WM_MOUSEMOVE 消息!
    可是 我在我的MySplitterWnd 类里面添加了这样的话 来重载这个消息
    // Generated message map functions
    protected:
    //{{AFX_MSG(V2SplitterWnd)
    afx_msg void OnMouseMove(UINT nFlags, CPoint point);
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()LINK 通过 然后就出错! 我这些话是从另外的一个例子程序抄过来的,那个例子就没有问题!,为什么我这么一抄就出错了呢!
    错误报告是:
    unresolved external symbol "protected: virtual struct AFX_MSGMAP const * __thiscall V2SplitterWnd::GetMessageMap(void)const " (?GetMessageMap@V2SplitterWnd@@MBEPBUAFX_MSGMAP@@XZ)
    Error executing link.exe.
      

  5.   


    Prevent Static Splitter Bars from Tracking 
                 (防止拖动Splitter Bars)
    SUMMARY
        In addition,to providing the ability to dynamically split a single view,the CSplitterWnd class provides a convenient method of displaying two or more view classes in a single frame. This type of splitter window is called a "static splitter." The CSplitterWnd class contains member functions that allow the splitter bar to be dragged by the mouse or moved using the keyboard to change the proportionate sizes of the views (or panes, in splitter terminology) within the frame.     Sometimes it is desirable to fix the initial position of the splitter bars and not allow the user to move them. This can be accomplished simply by deriving a class from CSplitterWnd and overriding several members. This method is outlined below.     MORE INFORMATION
        Use ClassWizard to create a new class named CMySplitterWnd of class type "generic CWnd" and change the references to CWnd in the class declaration and BEGIN_MESSAGE_MAP macro to CSplitterWnd.     Using ClassWizard, create message handlers for WM_LBUTTONDOWN, 
    WM_LBUTTONUP, WM_LBUTTONDBLCLK, and WM_MOUSEMOVE. Bypass the CSplitterWnd functionality in each of these overrides by calling the corresponding CWnd handlers. The following example illustrates the WM_LBUTTONDOWN handler:     void CMySplitterWnd::OnLButtonDown(UINT nFlags, Cpoint point)
        {
             CWnd::OnLButtonDown(nFlags, point);
        }     Change any embedded CSplitterWnd members of your frame class to type CMySplitterWnd.     Remove any menu items that generate a ID_WINDOW_SPLIT command (such as the "Split" item on the VIEWEX sample's "Window" menu). This prevents CView::OnSplitCmd() from being called.
      

  6.   

    可能是LIB没有加到工程里吧。
    比如Winsock函数,不是用向导的话,又没有自已包含相关的库,用了socket函数,就会出这样的
    错。
      

  7.   

    to:yhou31(爱谁是谁) 
    多谢