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?
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?
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.
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