我的CDialogBar为什么不能用鼠标拖动来改变大小?

yuanchao111 yuanchao111 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
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);
...
}
...全文

相关推荐

评论 14
收藏 已收藏
分享
返回顶部
yuanchao111
界面 15,976 成员 115,866 内容