Thread: Child windows

  1. #1
    Sanity is for the weak! beene's Avatar
    Join Date
    Jul 2006

    Child windows

    I'm planning on writing a game engine and i'm stumped at the first step.
    I want my engine to have 4 child windows, equal in size, and cemetrical, like:

    CW CW
    CW CW

    (CW = child window)

    Sort of thing

    Can anyone help me?

  2. #2
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Get the size of the parent window. Divide the length and width by 2, set the size of your windows to those values.

    Side note: Your in trouble if you didn't already know this.

  3. #3
    train spotter
    Join Date
    Aug 2001
    near a computer
    Depending on what you want each child to do and what you are using (MFC, WIN32 C/C++ ect).....

    Look at MDI (Multiple Document Interface)
    [creating a base CW class to derive each diff one from?]

    Splitter Windows (may work depending on you app...)

    If you want to create 4 children look at

    GetWindowRect() //gets the whole window inc borders
    GetClientRect() //just the bit you can use
    ScreenToClient() //from the top left of the screen to the TL of your window

    AdjustWindowRect() //resizes a window so you have a set size client/useable area
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can't create child windows
    By OnionKnight in forum Windows Programming
    Replies: 4
    Last Post: 04-10-2011, 04:13 PM
  2. Displaying Text on MDI child windows
    By EmbeddedC in forum Windows Programming
    Replies: 4
    Last Post: 10-30-2008, 12:28 PM
  3. Keeping child windows in their place
    By Smallz in forum Windows Programming
    Replies: 1
    Last Post: 08-27-2006, 06:22 AM
  4. Child Windows and Messages
    By Terrell in forum Windows Programming
    Replies: 10
    Last Post: 09-05-2002, 06:39 AM
  5. child windows
    By face_master in forum Windows Programming
    Replies: 14
    Last Post: 03-01-2002, 07:08 AM