flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 01 Apr 2008, 15:06
If you mean topmost as in always over all other windows then try SetWindowLong
If you mean topmost as in only between the two windows in your app then try BringWindowToTop And for finer control use SetWindowPos |
|||
![]() |
|
oobie-noobie 01 Apr 2008, 15:25
Thanks for the fast answer.
I tried both Code: invoke BringWindowToTop, [hWndMain] and Code: invoke SetWindowPos, [hWndMain], HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE+SWP_NOSIZE+SWP_SHOWWINDOW directly after creating the 2nd (auxiliary) window, but neither made any difference. Yes, the overlapping is only between *my* 2 windows. |
|||
![]() |
|
revolution 01 Apr 2008, 15:30
SDK wrote: If the SWP_SHOWWINDOW or SWP_HIDEWINDOW flag is set, the window cannot be moved or sized. |
|||
![]() |
|
oobie-noobie 01 Apr 2008, 15:44
Yup, sorry I hadn't seen that in the SDK remarks
![]() Anyway, with the SWP_SHOWWINDOW removed, the aux is still on top. ![]() Do I need to use a different class or a sub-class (?) for the aux window? |
|||
![]() |
|
revolution 01 Apr 2008, 15:49
Try adjusting some styles in the second call to CreateWindowEx.
|
|||
![]() |
|
revolution 01 Apr 2008, 15:50
oobie-noobie wrote: Do I need to use a different class or a sub-class (?) for the aux window? |
|||
![]() |
|
oobie-noobie 01 Apr 2008, 16:10
I've tried all sorts of exotic mixes with both window styles, some resulting in aux being the child (inside main), others (WS_POPUPWINDOW+WS_CAPTION) where the aux fills the whole screen and even the caption bar isn't visible.
No matter what combinations I try, I can't get them so that I can bring either to the top, the aux always remains topmost ![]() |
|||
![]() |
|
revolution 01 Apr 2008, 16:23
Can you click on each window to bring it to the top?
|
|||
![]() |
|
oobie-noobie 01 Apr 2008, 16:29
I can click on both windows. The main window's title bar will appear as if it is the topmost window, but the aux window will still overlap it.
Anyway, the eureka moment... I thought I *had* to declare the main window as the parent of the aux. Apparently not. If I make the owner of the aux window NULL, then either window comes to the top when clicked ![]() Thanks for your help revolution, we got there in the end ![]() |
|||
![]() |
|
revolution 01 Apr 2008, 16:36
Yes, you can make as many main windows as you want, there are no restrictions on that. Having a parent window means it is constrained to fit inside and on top of said parent.
Actually a parent of 0 in really a child window on top of the desktop window. |
|||
![]() |
|
oobie-noobie 01 Apr 2008, 16:39
Thanks for the clarification
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.