|
-
April 3rd, 2009, 07:50 AM
#1
Child Window topmost
Hi, I'm trying to get a child window to be topmost, really is a modeless dialog box, above other normal child windows. When I create the dialog box, I call SetWindowPos:
SetWindowPos(hToolsDlg, HWND_TOPMOST, 0,0,0,0, SWP_NOSIZE | SWP_NOMOVE);
but when another child window moves or get active, it get above dialog box. I don't know why happens that.
The style of de dialog box is:
WS_SYSMENU | WS_VISIBLE | WS_CHILD | WS_EX_PALETTEWINDOW | WS_CLIPSIBLINGS
and the style of the normal child window is:
WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW
Thanks.
Last edited by The_Judgement; April 3rd, 2009 at 08:31 AM.
-
April 6th, 2009, 04:08 AM
#2
Re: Child Window topmost
Hi, may be you should check this out.
LockSetForegroundWindow()
Regards,
Kevin Choong
-
April 6th, 2009, 04:10 AM
#3
Re: Child Window topmost
SetWindowPos(hWnd, HWND_TOPMOST... adds WS_EX_TOPMOST style.
WS_EX_TOPMOST applies only to top-level windows and not for the child ones.
Note: child windows have the WS_CHILD style set; all others are top-level windows.
[ later edit ]
In other words: topmost can be only the toplevel windows.
Last edited by ovidiucucu; April 6th, 2009 at 04:27 AM.
-
April 6th, 2009, 06:10 PM
#4
Re: Child Window topmost
Thanks for reply.
So, that means with that function and with the ES_EX_PALETTEWINDOW style I can do that.
Anyone knows how to get a child window stay above other child windows? I've seen that in a program, Icofx, but I don't know how can I get that in C.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|