Skip to main content
GameDev.net gamedev.net
🔒 Locked

Child window styles

Started by Aprosenf Oct 13, 2004 at 12:31 PM 1 replies 750+ views
Original Post
Aprosenf
Aprosenf
I'm trying to create a program which has a main window with a bunch of child windows. For the main window, I'm using the WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_VISIBLE styles, and for each of the child windows, I'm using the WS_OVERLAPPEDWINDOW | WS_CHILD | WS_CLIPSIBLINGS | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE styles. However, when the child windows are created, they are never in focus (i.e. have a gray title bar), but I can move them around and resize them. However, if I click to move or resize a child window that is behind another child window, it gets moved or resized as I hold the mouse down, but it stays behind the other child until I release the mouse. What window styles should I be using, and do I need to do anything special in the child window procedure to get normal child behavior? I.e. I want the foremost child to be in focus (have non-grayed title bar), and a child window should come immediately into focus when clicked instead of when the mouse is released.
Aprosenf
Aprosenf
Yes, I want to do an MDI-type program, but I don't want to deal with all of that nasty interfacing with MDI. I just want to create a bunch of child windows that know how to behave properly, and I'll handle all of the rest of the functionality myself.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.