Do you think something like this will do? ------- patch begin ----------- Index: dlls/comctl32/treeview.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/treeview.c,v retrieving revision 1.125 diff -u -r1.125 treeview.c --- dlls/comctl32/treeview.c 5 Sep 2003 23:08:42 -0000 1.125 +++ dlls/comctl32/treeview.c 9 Sep 2003 19:26:47 -0000 @@ -4730,7 +4730,7 @@ /* Create/Destroy *******************************************************/ static LRESULT -TREEVIEW_Create(HWND hwnd) +TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs) { RECT rcClient; TREEVIEW_INFO *infoPtr; @@ -4809,7 +4809,10 @@ infoPtr->root->iLevel = -1; infoPtr->root->visibleOrder = -1; - infoPtr->hwndNotify = GetParent(hwnd); + infoPtr->hwndNotify = lpcs->hwndParent; + if(!IsWindow(infoPtr->hwndNotify)) + infoPtr->hwndNotify = GetParent(hwnd); + #if 0 infoPtr->bTransparent = ( GetWindowLongA( hwnd, GWL_STYLE) & TBSTYLE_FLAT); #endif @@ -5188,7 +5191,7 @@ else { if (uMsg == WM_CREATE) - TREEVIEW_Create(hwnd); + TREEVIEW_Create(hwnd, (LPCREATESTRUCTW)lParam); else goto def; } ------- patch end -------------
I also checked some other controls in comctl32 and every implementation is different. Usualy there is no hwndNotify and GetParent() is used in SendMessageW calls and all of these need to be replaced. Luckily most of control implementations are already forwarding lpcs to *_Create functions. Igor > -----Original Message----- > From: Dimitrie O. Paun [mailto:[EMAIL PROTECTED] > Sent: September 9, 2003 10:35 AM > To: Igor Grahek > Cc: [EMAIL PROTECTED] > Subject: RE: TreeView control - set correct hwndNotify > > > On Tue, 9 Sep 2003, Igor Grahek wrote: > > > I'm pretty new at Wine patching and CreateWindowEx does some other > > parent checking so I didn't want to break anything else by > fixing this > > one. > > Yes, but this solution just looks to ugly to be propagated to the > other controls. Let's find a nice one that we can live with. > > -- > Dimi. > >