Re: WinCreateStdWindow, Client and Frame question
- From: Lars Erdmann <lars.erdmann@xxxxxxxx>
- Date: Sat, 07 Jul 2007 13:17:37 +0200
info@xxxxxxxxxxxx schrieb:
Hello,
in the WDsibyl library (an OS/2 Delphi clone), default forms
(=windows) are not created via WinCreateStdWindow which generates a
frame and a client window simultaneously. Instead, the frame window is
created first by WinCreateWCWindow and then the client window is
created by WinCreateWindow. I cannot see how the two handles are
connected to each other. Generally, the code works, but there is one
problem: When leaving an application with several windows, the window
rests in the switch list (shown by mole.exe, for example) once in a
while, but the WPS window list does not show them. In consequence,
shutdown hangs.
I assume that an incorrect client/frame connection forces these
problems and I have to reprogram the code with one CreateStdWindow
call. Before doing that, I want to ask
(1) is it allowed to split the window creation in two api calls for
frame and client window?
Yes, just make sure that the frame's parent is the desktop and the frames owner is NULLHANDLE, the client's parent as well as owner is the frame window.
(2) is it possible to connect the frame with client and reverse after
a separate creation?
Yes, but that would be unnecessary. A destroy call to the parent will also destroy all children and below. But you have to make sure that you ONLY destroy the frame (which is the topmost parent) and NOT destroy any children beforehand (before the frame is destroyed). I think PM does not like that. By only destroying the frame that call will propagate down recursively to all lower windows/children and PM will be able to keep track of what window handles become invalid.
.
For WSsibyl programmers: the code is part of forms.pas, procedure
tControl.CreateWnd for the client and tFrameControl.CreateWnd for the
frame. tFrameControl.CreateWnd gets executed from tControl.CreateWnd,
which gets executed from tControl.Show, if the handle does not exist.
Martin Vieregg
- Follow-Ups:
- References:
- Prev by Date: Re: 256 colors
- Next by Date: Re: 256 colors
- Previous by thread: WinCreateStdWindow, Client and Frame question
- Next by thread: Re: WinCreateStdWindow, Client and Frame question
- Index(es):
Relevant Pages
|