Using child windows in SDI application
-
I want to use a couple of child windows in my SDI application (with caption, min and max boxes, etc...(eg. WS_OVERLAPPEDWINDOW). They are children of CView. When I create them in response to CView's WM_CREATE, the children are not shown. But when I regster a class for my children, the are shown. Why is like that? But the real problem is that those windows don't have a focus (even when a caption bar is clicked they still have inactive caption!!). Pressing a key generates WM_KEYDOWN for CView not for the child window. Another problem: If I create a button in the child window and click it, the button has all the time focus, even when other child window are clicked. I cannot find any example of how to create child windows in a main window. I have over 40 books on VC++ but none of those explain this. Thank you any suggestions (The same problem occurs when children are created in SDI without Doc/View support). Jerzy