标题:
子窗口随父窗口缩放管理类 实例
[打印本页]
作者:
look_w
时间:
2019-1-19 16:34
标题:
子窗口随父窗口缩放管理类 实例
//应用实例
//Dlg6Dlg.h
class CDlg6Dlg : public CDialog
{
public:
CWindowSizeMange m_WinsizeManage;
protected:
virtual BOOL OnInitDialog();
afx_msg void OnSize(UINT nType, int cx, int cy);
//Dlg6Dlg.cpp
BEGIN_MESSAGE_MAP(CDlg6Dlg, CDialog)
//{{AFX_MSG_MAP(CDlg6Dlg)
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BOOL CDlg6Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
//记录控件位置
m_WinsizeManage.Init(m_hWnd);
return TRUE;
}
void CDlg6Dlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
m_WinsizeManage.ResizeWindow();
}
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/)
Powered by Discuz! 7.0.0