Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need asssistance changing App View Size in MFC SDI App!

Status
Not open for further replies.

pghTech

Technical User
Jul 19, 2006
37
US
I have created a SDI using VC++ 2005 w/ MFC, and I was hoping someone could tell me how to make the following view changes:

1) When you run the application, I would like for it to default to full screen, BUT I would like for it to just make the application full screen at a default limited width. For example, when you create a Dialog based MFC app, and you maximize the application it just makes the window no bigger than the actual size of the form.

- Currently now, it opens not maximized, there for showing only 1/2 the dialog window, with a horizontal scroll bar. Once you maximize the window, it takes up the complete screen with the application only taking up the left half, and a bunch of dead space on the right ~ half the screen. I would Like it to maximize to only the actual dialog window size.

Any suggestions
 
Well, this is the non-MFC way to do it, but there's probably an equivalent:

While processing the WM_SIZE message, change the x extents to 0 and the width of the screen, which can be gotten from SystemMetrics. This will force the window to always be the width of the screen. If I remember correctly, WM_SIZE gets sent before the window is first made visible.

Is there an "OnSize" method in MFC?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top