It looks like comctl32.dll is seting up some hooks to forward messages to requested window because even if you use --dll comctl32=n the owner is set up to "GetAncestor( cs->hwndParent, GA_ROOT )" Same thing happends under Windows so it seems that everything is OK with windows/win.c
I tried to figure out what is going on with hooks but I don't have much experience with windows hooks so I will appreciate any help.
Thanks, Igor
-----Original Message----- From: Igor Grahek [mailto:igorg@cadlink.com] Sent: September 5, 2003 11:29 AM To: 'wine-devel@winehq.org' Subject: RE: TreeView & WM_NOTIFY
Here is an example in attachment (Visual C++ project) . If you click on "tst" button it opens TreeView control with WS_POPUP and Cview as parent (to process WM_NOTIFY messages) With current code in windows/win.c owner is set to "GetAncestor( cs->hwndParent, GA_ROOT )" and WM_NOTIFY goes to wrong window. If I change code so that owner is "WIN_GetFullHandle(cs->hwndParent)" then there is problem with Z ordering (keeping popup window on top) but WM_NOTIFY goes to Cview as it should.
However if I use --dll comctl32=n and owner is set to "GetAncestor( cs->hwndParent, GA_ROOT )" everything works OK
- popup is on top and CView receives WM_NOTIFY from it.
I know I'm repeating myself but I'm not sure where I should look for the problem: is it in dll/comctl32/treeview.c (as --dll comctl32=n suggesting) or is it in windows/win.c and dll/x11drv/* ?
Igor
-----Original Message----- From: Igor Grahek [mailto:igorg@cadlink.com] Sent: September 4, 2003 1:50 PM To: 'Dimitrie O. Paun' Cc: 'wine-devel@winehq.org' Subject: RE: TreeView & WM_NOTIFY
I think I found the source of my problem:
Wine/windows/win.c ::CreateWindowEx
if ((cs->style & (WS_CHILD|WS_POPUP)) == WS_CHILD) parent = WIN_GetFullHandle(cs->hwndParent); else owner = GetAncestor( cs->hwndParent, GA_ROOT );
Why owner is not set to "WIN_GetFullHandle(cs->hwndParent)" ?
If I change this everything works OK except there is a problem with Z ordering (it is hiding popup window behind its owner when Managed=N) Is the source of problem somewhere in wine/dll/x11drv/winpos.c (I'm currently examining SWP_DoOwnedPopups function) and why it is working with --dll comctl32=n - no problems with Z order there?!
BTW I'm working with 20030618 build.
Igor
-----Original Message----- From: Dimitrie O. Paun [mailto:dimi@intelliware.ca] Sent: September 2, 2003 6:42 PM To: Igor Grahek Cc: wine-devel@winehq.org Subject: Re: TreeView & WM_NOTIFY
On Tue, 2 Sep 2003, Igor Grahek wrote:
My problem is very similar to bug 1227 (http://bugs.winehq.org/show_bug.cgi?id=1227) Treeview in application is sending WM_NOTIFY on double
click (NM_DBLCLK)
to the wrong Window handle. GetParent() function returns handle to the
root window
and root window is not forwarding/broadcasting that message
and message
is lost. Everything works fine under Windows or with --dll comctl32=n
I'm afraid you'll need to debug this and post a lot more
detail, maybe
a code fragment showing the undesirable behaviour.
-- Dimi.