OS/2, eCS & ArcaOS - Technical > Programming

how to stay a window on top

<< < (6/6)

Martin Vieregg:
Rich,

the WS_TOPMOST setting is for the system wide float on top. This can be useful for very specific programs like a virtual desktop manager, a tool bar or a clock. In all these cases, the window which is allowed to float to system top should be small. It does not get the focus, of course. Because of the lack of knowing the existance of this hidden flag, for example the PMVdesk virtual desktop tool and others do floating via timer.

It was indeed not clear for me that the relationship of the child window defines the behaviour of the ZOrder. But in a lot of cases, a float or "rest" on top is not useful. For example, my WSedit editor has got a content tree window which should be placed on the desktop with the same rights as the main window.

So in the WDsibyl library, all windows are started without ownership and are listed in the Screen.Forms[] property. (A created tForm does not mean automatically that the window has been created on the OS-handle level. This is done in SetupShow.) One window is the Application.Mainform, but this only means that this window is started first when starting the application. I had problems with cleaning up the windows when creating a window with an owner. The current state is pehaps not "holy PM programming", but it works fine. I am not sure if I can turn off the relationship after creating a window with an owner. With the new FormStyle = wsStayOnTop property I can turn on and off this setting while the window exists.

Navigation

[0] Message Index

[*] Previous page

Go to full version