我的CDialogBar为什么不能用鼠标拖动来改变大小?
CPMExploreBar是从CDialogBar集成过来的一个类,如图,我按照msdn上的“HOWTO: Make a Resizable Dialog Bar”那篇文章重载了它的CalcDynamicLayout虚函数,但是鼠标在拖动时仍然不能改变大小,哪位高手能够解决?请不要给我贴msdn上的文章,因为我都看过了
class CPMExploreBar:public CDialogBar{
DECLARE_DYNAMIC(CDialogBar)
public:
CPMExploreBar();
virtual ~CPMExploreBar();
afx_msg void OnSize(UINT nType, int cx, int cy);
BOOL Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID);
virtual CSize CalcDynamicLayout( int nLength, DWORD dwMode );
CSize m_sizeDocked;
CSize m_sizeFloating;
BOOL m_bChangeDockedSize;
protected:
DECLARE_MESSAGE_MAP()
}
class CMainFrame{
private:
CPMExploreBar m_wndExploreBar;
}
CMainFrame::OnCreate(...)
{
...
m_wndEditBar.Create(this, IDD_EDIT_BAR,WS_CHILD|WS_VISIBLE| CBRS_LEFT | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC,IDD_EDIT_BAR);
...
}