我不想让一个切分窗口的 切分条能被拖动,我应该怎么办!!

Robert2001 2001-11-30 09:54:11
...全文
142 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
Robert2001 2001-12-01
  • 打赏
  • 举报
回复
to:yhou31(爱谁是谁) 
多谢
san_huo 2001-11-30
  • 打赏
  • 举报
回复
派生CSplitterWnd类,重载其OnSetCursor(return true),MouseMove、LButtonDown(直接返回),然后用这个类来创建分割窗口
Robert2001 2001-11-30
  • 打赏
  • 举报
回复
要手动添加好累啊!
具体的是响应那个事件呢!
Robert2001 2001-11-30
  • 打赏
  • 举报
回复
具体是那个鼠标动作,click 还是 BUTTONDOWN
清泉ys 2001-11-30
  • 打赏
  • 举报
回复
class CMySplitterWnd : public CSplitterWnd
重载
return true;
dongfa 2001-11-30
  • 打赏
  • 举报
回复
重载分隔条窗口,然后就像楼上说的。
stevenW 2001-11-30
  • 打赏
  • 举报
回复
从载鼠标的几个动作
hujun614 2001-11-30
  • 打赏
  • 举报
回复
可能是LIB没有加到工程里吧。
比如Winsock函数,不是用向导的话,又没有自已包含相关的库,用了socket函数,就会出这样的
错。
yhou31 2001-11-30
  • 打赏
  • 举报
回复

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.
Robert2001 2001-11-30
  • 打赏
  • 举报
回复
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.
dog_dog 2001-11-30
  • 打赏
  • 举报
回复
study
san_huo 2001-11-30
  • 打赏
  • 举报
回复
就是上面几个函数,方法都告诉你了!
dongfa 2001-11-30
  • 打赏
  • 举报
回复
WM_LBUTTONDOWN,WM_LBUTTONUP,WM_MOUSEMOVE
Robert2001 2001-11-30
  • 打赏
  • 举报
回复
这个类 我已经派生了!但是我现在不知道 该重载那个函数来处理这个问题!

16,550

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧