Reputation: 3
I'm trying to intercept the size and position change of my CDialog based window using C++ with MFC framework (VS 6.0), in order to adapt the positions of my composants according to the new size and/or position.
How can I do this ?
Thank you !
Upvotes: 0
Views: 451
Reputation: 6040
1) In the message map of your dialog, add an ON_WM_SIZE() macro
2) In your dialog, add the following message handler:
void CYourDerivedDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
// do whatever else you need
}
Upvotes: 2