Hi all,
an InstallShield installer does a SetParent() on a dialog that has been
created within another dialog, with this dialog being its "owner".
Directly after that SetParent, it does a GetParent which fails:
if(!(wndPtr = WIN_FindWndPtr(hwnd))) return 0;
if ((!(wndPtr->dwStyle & (WS_POPUP|WS_CHILD))))
goto end;
--> 0.
(reason: no WS_CHILD style)
The program does many GetParent(), BTW.
I couldn't see any location where this window got set its WS_CHILD style
inside SetParent (do a grep on WS_CHILD in the Wine tree and you'll see).
By doing
pWndOldParent = WIN_LockWndPtr((*wndPtr->pDriver->pSetParent)(wndPtr,
pWndNewParent));
+ wndPtr->dwStyle |= WS_CHILD;
in SetParent, the installer proceeded.
Now it updated the progress bar that it was supposed to update
and installed -- well, not quite; it bailed out somewhat later :-\
At first I thought that this might be a valid fix, but it isn't:
MSDN indicates that SetParent doesn't touch the WS_CHILD flag.
Maybe the WS_CHILD flag should have been set already at dialog creation
as the "owner" field of the inner dialog was the main dialog ?
The installer works if I do it there, BTW.
(by setting the flag in the CREATESTRUCT in WIN_CreateWindowEx
if the parent is valid)
I can't believe that that fix is valid, though
(it probably would have been detected much earlier in that case)
Any idea ?
Back to fixing the new "crash" with the installer ;-)
Andreas Mohr