can windows be reparented?

Dmitry Timoshkov dmitry at baikal.ru
Tue Aug 13 20:32:49 CDT 2002


<us at the-edmeades.demon.co.uk> wrote:

> To be honest I never investigated further once I commented out the SetParent call,
> as I was continuing to fix oleaut32 and left the gui side to someone else!
> 
> I know it was being called in the failing case, and removing it allowed the
> windows to pop up, BUT they were still wrong as you could access the 'parent'
> whereas you should not be able to

Could you please test patch posted by Bill Medland to wine-patches today? It's
not entirely correct though. My tests show that SetWindowLong(GWL_HWNDPARENT)
call changes simultaneously both parent and owner for top level windows and
returns old value (not sure old owner or parent it is).

But top level windows created by Visual Vasic are special: they have no parent,
but only owner according to Spy++. In my tests I can't reproduce it yet.

A bit of investigation of Wine source revealed that some places use
GetAncestor(hwnd, GA_PARENT), while others use GetParent(hwnd). Since
their behaviour is different in respect of top level and child windows,
some major clean up in that area in Wine is needed.

-- 
Dmitry.






More information about the wine-devel mailing list