Qbasicnews.com

Full Version: MDI Child in C++
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,

How do I create an MDI child in C++ using pure API, no resources? I know there is an easy method but I can't quite get it to work...

Thanks in advance
Take a look at the parameters to CreateWindowEx - one of the arguments allows you to specify a parent window (which would be the MDI parent). You must also specify in dwExStyle argument that it is an MDI child by OR'ing the flag WS_EX_MDICHILD.

Of course, because you'll be using the same window class for each MDI window, they will all use the same callback function, so it is easy to manage them all. Smile

I've never done this before, but this is how I imagine it works (somebody correct me if I'm wrong...).

It's too late here to write code to do it as an example! Smile

-shiftLynx
There are some subtle differences in the way the two are handled, but uh if your using C++ id use mfc. its so much easier. but if your sure you want mdi(which microsoft actually discourages officially now, apparently the preffered method is mutliple instances) in the c api then google win32 api. the first link is what you want. (the forgers tutorial or something like that)