| ahbazzi (45) | |||
|
I am developing a small application where i have main window Wnd1 that contains a child window as a form Form1. This child window contains in it turn another child window and some popups that are created when a push button pressed. The problem is that the child windows of Form1 are not created due to the style of the windows. I dont know what style to use. I tried ws_popup but it didnt work as well. below is the code sample of creating all windows:
I tried to assign Wnd1_v as parent window of the popup window but it didnt work as well. Please any ideas what I'm having wrong? | |||
|
Last edited on
|
|||
| ahbazzi (45) | |
|
Wen I specified the style as WS_CHILD | WS_CAPTION for the 3rd window, it was created but NOT SHOWEN. Then I set its parent to be Wnd1_v so it showed. This is not what I need. I want its parent to be Form1_v and not Wnd1_v. Furthermore, I noticed that Form1_v window is always on top of the 3rd window. Which style is causing this? What I need is having the active form or window on the top of all other windows. Besides, any ideas on how and when to use the WS_POPUP and WS_POPUPWINDOW styles. I had checked the explaination of MSDN about window style and extended styles, but they are confusing and not that clear in some cases. Please advise. | |
|
Last edited on
|
|
| guestgulkan (2915) | |
| is it possible to post the whole code?? | |
|
|
|
| AHCFan20 (17) | |
| I think with WS_POPUP you have to call SetParent after creating it. WS_POPUP creates a client-only window; no border or title bar. | |
|
|
|
| ahbazzi (45) | |
|
1- It is difficult to post the whole code because each window is being created in a different class with a lot of checking and structures initialization. However, my previous post shows exactly how CreateWindowEx was used in my code. 2- Regarding: WS_POPUP creates a client-only window; Thanks for the info. I didnt know. But then what about WS_POPUPWINDOW? How it may help? 3- And what i have to do to set Form1_v as the parent of the 3rd window insted of Wnd1_v? 4- When I move a window (Form1_v or the 3rd window) on the top of the other, and then move way, the windows are NOT REDRAWN. I guess I have to handle some messages like WM_PAINT, however, this message is not generated for those windows. I am printing to a file all the generated messages and WM_PAINT was not generated neither for the Form1_v window nor for the 3rd window. What do you suggest.. Thanks in advance | |
|
|
|