Original Post
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.