Child windows

This is a discussion on Child windows within the Windows Programming forums, part of the Platform Specific Boards category; I'm planning on writing a game engine and i'm stumped at the first step. I want my engine to have ...

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

    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
    Location
    Alabama
    Posts
    1,065
    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
    Location
    near a computer
    Posts
    3,859
    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
    ClientToScreen()

    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, 05:13 PM
  2. Displaying Text on MDI child windows
    By EmbeddedC in forum Windows Programming
    Replies: 4
    Last Post: 10-30-2008, 01:28 PM
  3. Keeping child windows in their place
    By Smallz in forum Windows Programming
    Replies: 1
    Last Post: 08-27-2006, 07:22 AM
  4. Child Windows and Messages
    By Terrell in forum Windows Programming
    Replies: 10
    Last Post: 09-05-2002, 07:39 AM
  5. child windows
    By face_master in forum Windows Programming
    Replies: 14
    Last Post: 03-01-2002, 07:08 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21