Mindo
asked on
Preventing the sizing of the CView derived class
I have a CView derived class and i want to restrict sizing of this window till some specific size.
I tried to do this in OnSize() and OnWindowPosChanged() events, but they didn't work.
Can anybody post a few lines of code how to do this?
Thanks.
I tried to do this in OnSize() and OnWindowPosChanged() events, but they didn't work.
Can anybody post a few lines of code how to do this?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You should respond to WM_GETMINMAXINFO.
and set the ptMinTrackSize and ptMaxTrackSize to the same value that
you want your view to be.
regards,
Mike.
and set the ptMinTrackSize and ptMaxTrackSize to the same value that
you want your view to be.
regards,
Mike.
woah - Zoppo's too quick :)
If you want the main frame to remain the same size, you can specify that it can't be resized by turning the WS_THICKFRAME style off in your main frame class' PreCreateWindow() function.