Catch WM_SIZE
- From: Erakis <Erakis@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Aug 2008 07:52:17 -0700
Hi,
How to catch the WM_SIZE message of a control created dynamically.
I mean :
BOOL CMyDialog::OnInitDialog()
{
CDialog::OnInitDialog();
// m_MyControl derived from CWND
m_MyControl.Create( NULL, _T(""), WS_VISIBLE, CRect(10, 10, 0, 0), this,
1 );
}
LRESULT CMyDialog::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_SIZE : // Catch this message but when it is m_MyControl
that is resizing.
}
}
Regards,
.
- Follow-Ups:
- Re: Catch WM_SIZE
- From: AliR \(VC++ MVP\)
- Re: Catch WM_SIZE
- From: Scott McPhillips [MVP]
- Re: Catch WM_SIZE
- Prev by Date: Re: CreateNewFrame ends in Unhandled Exception
- Next by Date: Re: MFC GoTo Bookmark Error
- Previous by thread: CMFCMenuBar + menu accelerators/mnemonics
- Next by thread: Re: Catch WM_SIZE
- Index(es):
Relevant Pages
|