1. Secondary window always on top
- Posted by Rodolfo Valeiras <rodoval at altavista.net> Sep 02, 2000
- 521 views
- Last edited Sep 03, 2000
In the following program, Window 3 is always on top of Window 1 (parent). Can you avoid? It use Win32Lib 0.50c. Thanks, Rodolfo Valeiras --- include WIN32LIB.EW constant V1 = create(Window, "Window 1", 0, Default, Default, 200, 200, 0), V2 = create(Window, "Window 2", 0, Default, Default, 300, 100, 0), V3 = create(Window, "Window 3", V1, Default, Default, 200, 300, 0), B2 = create(PushButton, "2", V1, 10, 10, 30, 30, 0), B3 = create(PushButton, "3", V1, 10, 50, 30, 30, 0) procedure OnClick_B2() openWindow(V2, Normal) end procedure onClick[B2] = routine_id("OnClick_B2") procedure OnClick_B3() openWindow(V3, Normal) end procedure onClick[B3] = routine_id("OnClick_B3") WinMain(V1, Normal)
2. Re: Secondary window always on top
- Posted by Brian Broker <bkb at CNW.COM> Sep 03, 2000
- 454 views
On Sat, 2 Sep 2000 21:01:12 +0200, Rodolfo Valeiras wrote: >In the following program, Window 3 is always on top of Window 1 (parent). >Can you avoid? It use Win32Lib 0.50c. > >Thanks, > >Rodolfo Valeiras > >--- > >include WIN32LIB.EW > >constant > V1 = create(Window, "Window 1", 0, Default, Default, 200, 200, 0), > V2 = create(Window, "Window 2", 0, Default, Default, 300, 100, 0), > V3 = create(Window, "Window 3", V1, Default, Default, 200, 300, 0), > > B2 = create(PushButton, "2", V1, 10, 10, 30, 30, 0), > B3 = create(PushButton, "3", V1, 10, 50, 30, 30, 0) > > >procedure OnClick_B2() > openWindow(V2, Normal) >end procedure >onClick[B2] = routine_id("OnClick_B2") > >procedure OnClick_B3() > openWindow(V3, Normal) >end procedure >onClick[B3] = routine_id("OnClick_B3") > > >WinMain(V1, Normal) Sure, just 'create' it the same way that you created Window V2... You specified that V3 was a child of V1 but V2 as it's own window. Since V3 is a child of V1 it is kept on top of the parent until it is closed. Try this: constant V1 = create(Window, "Window 1", 0, Default, Default, 200, 200, 0), V2 = create(Window, "Window 2", 0, Default, Default, 300, 100, 0), V3 = create(Window, "Window 3", 0, Default, Default, 200, 300, 0), -- Brian
3. Re: Secondary window always on top
- Posted by Rodolfo Valeiras <rodoval at altavista.net> Sep 03, 2000
- 457 views
- Last edited Sep 04, 2000
> Sure, just 'create' it the same way that you created Window V2... You > specified that V3 was a child of V1 but V2 as it's own window. Since V3 is > a child of V1 it is kept on top of the parent until it is closed. Thank you, Brian. But, it is possible to put a child window below her parent? Rodolfo.
4. Re: Secondary window always on top
- Posted by Bernie <xotron at PCOM.NET> Sep 03, 2000
- 471 views
The order that windows are displayed in, is called the Z-ORDER. The second parameter of SetWindowPos sets what order ( or place ) a window will be displayed at ( it z-order position ). Also see functions BringWindowToTop, DeferWindowPos. By using these functions, you should be able to place a window above or below any other window. Bernie