How to set CDialog's minimum size?
-
I have a form which is inherited from CDialog.It can be resizing. Now I want to set its minimum size (300, 200). It couldn't be smaller than (300, 200). How to do it with MFC 6.0. Thanks in advance.
-
I have a form which is inherited from CDialog.It can be resizing. Now I want to set its minimum size (300, 200). It couldn't be smaller than (300, 200). How to do it with MFC 6.0. Thanks in advance.
Add a message map entry for
WM_GETMINMAXINFO
and override ...afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI );
//Now fill out lpMMI->ptMinTrackSize like this...
lpMMI->ptMinTrackSize.x = 300
lpMMI->ptMinTrackSize.y = 200;
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
-
I have a form which is inherited from CDialog.It can be resizing. Now I want to set its minimum size (300, 200). It couldn't be smaller than (300, 200). How to do it with MFC 6.0. Thanks in advance.
Off the top of my head, you should be able to do it by handling WM_GETMINMAXINFO / CWnd::OnGetMinMaxInfo. Iain.