CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    53

    MDI Apps - Unable to Maximize Main Frame

    I am trying to maximize the Main Frame window.I tried the following steps none of them worked out.Any body please help me giving some clue where the problem area is or where to look to sort out this problem.

    1. in InitInstance() I have coded
    if (!pMainFrame->LoadFrame(IDR_MAINFRAME,WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE|WS_MAXIMIZE))

    2. In Precreatewindow() of CMainFrame class
    cs.style = WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE|WS_MAXIMIZE;

    3.In Precreatewindow() of CMainFrame class
    cs.style |=WS_MAXIMIZE;

    Thanx in advance.



  2. #2
    Join Date
    Apr 1999
    Posts
    407

    Re: MDI Apps - Unable to Maximize Main Frame

    Try this:

    - Override the WM_SHOWWINDOW message handler in CMainFrame class and insert the following call in that handler:

    AfxGetMainWnd()->ShowWindow(SW_SHOWMAXIMIZED);




    Good luck!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured