How to make and MDI child window resizeable for a concrete size
-
I want a MDI child window to be resizeable not less than 200 not bigger than 500 pix for example, and only height. When you size the window less than that 200 pix the application should make the window 200 height, when you size to 300 pix won´t do anything, and when it will be bigger than 500 size to 500. I think it should be done on OnSize function but i dont know how. Other option is let sizing window in this interval 200-500 and when reach it 200 or 500 stop sizing. help would be appreciate, thanks.
-
I want a MDI child window to be resizeable not less than 200 not bigger than 500 pix for example, and only height. When you size the window less than that 200 pix the application should make the window 200 height, when you size to 300 pix won´t do anything, and when it will be bigger than 500 size to 500. I think it should be done on OnSize function but i dont know how. Other option is let sizing window in this interval 200-500 and when reach it 200 or 500 stop sizing. help would be appreciate, thanks.
you better handle WM_GETMINMAXINFO message.
-
I want a MDI child window to be resizeable not less than 200 not bigger than 500 pix for example, and only height. When you size the window less than that 200 pix the application should make the window 200 height, when you size to 300 pix won´t do anything, and when it will be bigger than 500 size to 500. I think it should be done on OnSize function but i dont know how. Other option is let sizing window in this interval 200-500 and when reach it 200 or 500 stop sizing. help would be appreciate, thanks.
And here's some example... void ::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) { // TODO: Add your message handler code here and/or call default if (m_bInit) // Make sure the view is initiated { lpMMI->ptMinTrackSize.x = ; lpMMI->ptMinTrackSize.y = ; } ::OnGetMinMaxInfo(lpMMI); }
-
And here's some example... void ::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) { // TODO: Add your message handler code here and/or call default if (m_bInit) // Make sure the view is initiated { lpMMI->ptMinTrackSize.x = ; lpMMI->ptMinTrackSize.y = ; } ::OnGetMinMaxInfo(lpMMI); }
If you handle the message you should not call BaseClass::OnGetMinMaxInfo(lpMMI) right?
-
If you handle the message you should not call BaseClass::OnGetMinMaxInfo(lpMMI) right?
Thanks, I handle WM_GETMINMAXINFO in CChildFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI){ // TODO: ..... lpMMI->ptMinTrackSize.x = 200; lpMMI->ptMaxTrackSize.x = 500; } it works but now i have a problem :confused:, I size the window to the min pixel size I choose, all ok, but then I try to make the window bigger traking it the traking border of the window not appear. why this problem? I use XP.