CControlPane : public CDockablePane里面 virtual int GetCaptionHeight() const { return 0;} ---- 禁掉caption
virtual BOOL IsResizable() const {return FALSE;} ---- 禁止resizeCMainFrame里CControlPane m_wndControlBar;if (!m_wndControlBar.Create(NULL,this,CRect(0,0,200,200),TRUE,666, WS_CHILD | WS_DLGFRAME | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_RIGHT))
{
TRACE0("Failed to create toolbar\n");
return -1;
}
m_wndControlBar.SetMinSize(CSize(150,rc.Height()));生成的pane覆盖了整个客户区, 下面的代码都不起作用, 在横坐标上就是不缩小, 这pane的left和top好象不能移动, 固定在左上角m_wndControlBar.SetWindowPos(&wndTopMost,rc.left+50,rc.top,rc.Width(),300,SWP_DRAWFRAME | SWP_NOSIZE );
m_wndControlBar.MoveWindow(CRect(rc.left+50, rc.top+50, rc.right, rc.bottom));都动不了pane左上角, 固定在客户区的左上角了, 怎么办???
virtual BOOL IsResizable() const {return FALSE;} ---- 禁止resizeCMainFrame里CControlPane m_wndControlBar;if (!m_wndControlBar.Create(NULL,this,CRect(0,0,200,200),TRUE,666, WS_CHILD | WS_DLGFRAME | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_RIGHT))
{
TRACE0("Failed to create toolbar\n");
return -1;
}
m_wndControlBar.SetMinSize(CSize(150,rc.Height()));生成的pane覆盖了整个客户区, 下面的代码都不起作用, 在横坐标上就是不缩小, 这pane的left和top好象不能移动, 固定在左上角m_wndControlBar.SetWindowPos(&wndTopMost,rc.left+50,rc.top,rc.Width(),300,SWP_DRAWFRAME | SWP_NOSIZE );
m_wndControlBar.MoveWindow(CRect(rc.left+50, rc.top+50, rc.right, rc.bottom));都动不了pane左上角, 固定在客户区的左上角了, 怎么办???
这个VC2010的sample里, 哪个是说CDockablePane? 看了几个都不是