Thread: Resize a child window in MDI

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    205

    Resize a child window in MDI

    Hi,
    I was wondering if anybody knew how to maximize a child window when it is first created in an MDI application. Thanks
    Amish

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    205
    Quote Originally Posted by Ken Fitlike
    Thanks for your reply.
    It seems that you can use SendMessage to do that but in which function should I call SendMessage so that everytime a new child window is created, it is maximised. My current MainFrame.cpp only has OnCreate() and PreCreateWindow() functions. Thanks for your time,
    Amish

  4. #4
    Registered User
    Join Date
    Dec 2004
    Posts
    205
    Found it:
    Code:
    void CChildFrame::ActivateFrame(int nCmdShow) 
    {
       // Create the child frame window maximized
       nCmdShow = SW_MAXIMIZE;
       
       CMDIChildWnd::ActivateFrame(nCmdShow);
    }
    Makes life easy
    Amish

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  3. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM