Re: Catch WM_SIZE



"Erakis" <Erakis@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:5BC2F5F0-D19B-4B3E-9881-EAC6B5000B32@xxxxxxxxxxxxxxxx
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 );
}


Add a WM_SIZE message handler in your derived-from-CWnd class. Use the Visual Studio IDE to do this and it will add the message map entry, and the OnSize function declaration, and a stub OnSize function definition.

--
Scott McPhillips [VC++ MVP]

.


Loading