[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 741
  • Last Modified:

Maximizeing an MFC SDI Frame window

No matter how I combine WS_MAXIMIZE with cs.style in CMainFrame::PreCreateWindow, when I execute the application it does not maximize. Please can you supply the correct syntax from an app that has actually been tried and works!
0
turnpike
Asked:
turnpike
1 Solution
 
ramshankCommented:
As you have noticed  changing the styles in the  CreateStruct of PreCreateWindow to WS_MAXIMIZE does not work.To maximize the Frame Window just add the statement
ShowWindow(SW_SHOWMAXIMIZED);
before the "return 0" statement  of the OnCretae function in the  CMainframe. This would solve your problem.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now