OS/2, eCS & ArcaOS - Technical > Programming
how to stay a window on top
Martin Vieregg:
OS/2 distinghishes between a standard "window" and a "dialog window". A visible difference is that a standard window has got an arbitrary icon on the system menu button. A dialog window has only a drop down array icon. Both windows can run in modal and non-modal state. The standard "window" is created with the API call "WinCreateWindow" or "WinCreateStdWindow". A dialog window is created with WinCreateDlg or with WinLoadDlg (from a resource) and a parameter is the address of a message processing function.
An interesting difference in the behaviour of both types of window is that a dialog window continously stays on top, even another window of the program gets the focus, also in non-modal state.
My question: Is there a flag where a window created with WinCreateWindow gets the same behaviour of staying on top like a "dialog window" does?
The reason is that I want to add a specific property to the WDsibyl component library. In Freepascal Lazarus, such a property exists (tForm.Formstyle = fsStayOnTop). The WDsibyl tForm component is completely based on WinCreateWindow, also all standard controls do so.
Laurence Pithie:
The FCF_SYSMODAL creation flag creates a system modal window. You can also use the WinSetSysModalWindow call to change a window into being the system modal window or from being the system modal window.
Martin Vieregg:
--- Quote ---The FCF_SYSMODAL creation flag creates a system modal window
--- End quote ---
But I want that the child window floats only over the main window of my appliction, not system wide. And it should be non-modal.
Alex Taylor:
For a PM frame window, try this:
--- Code: ---#define WS_TOPMOST 0x00200000L
WinSetWindowBits( hwndFrame, QWL_STYLE, WS_TOPMOST, WS_TOPMOST );
--- End code ---
Martin Vieregg:
I'm sorry, but the WinSetWindowBits code seems not to work.
A system wide Float to top would be helpful, too, because it is also part of the Freepascal Lazarus code. (FormStyle = fsSystemStayOnTop) But all variants are non-modal.
Navigation
[0] Message Index
[#] Next page
Go to full version