ChangeLog Make ipaddress send its notifications to the parent window passed to it in CREATESTRUCT. Based on a treeview patch by Igor Grahek. Index: dlls/comctl32/ipaddress.c =================================================================== RCS file: /var/cvs/wine/dlls/comctl32/ipaddress.c,v retrieving revision 1.34 diff -u -r1.34 ipaddress.c --- dlls/comctl32/ipaddress.c 22 Sep 2003 21:32:33 -0000 1.34 +++ dlls/comctl32/ipaddress.c 3 Nov 2003 21:04:14 -0000 @@ -61,6 +61,7 @@ typedef struct { HWND Self; + HWND Notify; IPPART_INFO Part[4]; } IPADDRESS_INFO; @@ -82,7 +83,7 @@ TRACE("(command=%x)\n", command); - return SendMessageW (GetParent (hwnd), WM_COMMAND, + return SendMessageW (infoPtr->Notify, WM_COMMAND, MAKEWPARAM (GetWindowLongW (hwnd, GWL_ID), command), (LPARAM)hwnd); } @@ -99,7 +100,7 @@ nmip.iField = field; nmip.iValue = value; - SendMessageW (GetParent (infoPtr->Self), WM_NOTIFY, + SendMessageW (infoPtr->Notify, WM_NOTIFY, (WPARAM)nmip.hdr.idFrom, (LPARAM)&nmip); TRACE("<-- %d\n", nmip.iValue); @@ -149,7 +150,7 @@ } -static LRESULT IPADDRESS_Create (HWND hwnd) +static LRESULT IPADDRESS_Create (HWND hwnd, LPCREATESTRUCTA lpCreate) { IPADDRESS_INFO *infoPtr; RECT rcClient, edit; @@ -173,6 +174,7 @@ edit.bottom = rcClient.bottom - 2; infoPtr->Self = hwnd; + infoPtr->Notify = lpCreate->hwndParent; for (i = 0; i < 4; i++) { IPPART_INFO* part = &infoPtr->Part[i]; @@ -508,7 +510,7 @@ switch (uMsg) { case WM_CREATE: - return IPADDRESS_Create (hwnd); + return IPADDRESS_Create (hwnd, (LPCREATESTRUCTA)lParam); case WM_DESTROY: return IPADDRESS_Destroy (infoPtr); -- Dimi.