首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

SDI分割窗体

2012-01-15 
求助:SDI分割窗体我在SDI中分割了三部分。m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CShutterView), C

求助:SDI分割窗体
我在SDI中分割了三部分。
m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CShutterView), CSize(100, 100), pContext)

m_wndSplitter1.CreateStatic(&m_wndSplitter,2,1,WS_CHILD|WS_VISIBLE,m_wndSplitter.IdFromRowCol(0,1)m_wndSplitter1.CreateView(0, 0, RUNTIME_CLASS(CHeaderView), CSize(1000,20), pContext) 
m_wndSplitter1.CreateView(1, 0, RUNTIME_CLASS(CRMonitorView), CSize(0,0), pContext)
为了将m_wndSplitter1分隔条不能移动。我重载了CSplitterWnd函数。
class CSplitterWndEx : public CSplitterWnd
在主框架引用
CSplitterWndEx m_wndSplitter1;

现在所有的视图窗口都改变了位置。是那种不规则的。和重载前分的视图不一样,全乱了
求高手帮忙!

[解决办法]
重载的话只需要在OnLButtonDown和OnMouseMove中直接return。

热点排行