|
-
August 10th, 1999, 08:25 AM
#1
preventing resize on a window
Hello,
This sounds very simple, all I want is to prevent users from being able to
resize the window of a program I made using MFC... please help.
thank you.
-
August 10th, 1999, 08:40 AM
#2
Re: preventing resize on a window
Yep sure is simple, all you have to do is open up your classwizard select the view class in question, and override the message handler for WM_SIZING...
once you have done this, the classwizard will create message handler for WM_SIZING, all you need to do is comment out the OnSizing Call to the base class..
hope this helps
James
hope this helps
James
-
August 11th, 1999, 08:36 AM
#3
Re: preventing resize on a window
James,
Thank you for your tip... however, I can't seem to make it work.. I handled
the WM_SIZING for the MainFrame class, but it did not work. When, I tried to
do the same thing with the WM_SIZE message, I can still resize the window. And if I try to make the window bigger than the original size, portions of the view
are not repainted..
Is there a way that I can stop the cursor from changing to the Horizontal and Vertical Resize cursors whenever it is positioned on the edge of my window?
thanks again..
-
August 11th, 1999, 06:31 PM
#4
Re: preventing resize on a window
In CMainFrame::PreCreateWindow(...), replace
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
with
cs.style &= ~WS_THICKFRAME;
If you also want to prevent minimizing and maximizing, add these lines:
cs.style &= ~WS_MINIMIZEBOX;
cs.style &= ~WS_MAXIMIZEBOX;
-
August 12th, 1999, 07:37 AM
#5
Re: preventing resize on a window
Ever tried to override OnGetMinMaxInfo
?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|