ChangeLog Cleanup the edit wndproc a bit. Index: dlls/comctl32/treeview.c =================================================================== RCS file: /var/cvs/wine/dlls/comctl32/treeview.c,v retrieving revision 1.131 diff -u -r1.131 treeview.c --- dlls/comctl32/treeview.c 13 Nov 2003 20:49:00 -0000 1.131 +++ dlls/comctl32/treeview.c 19 Nov 2003 04:36:49 -0000 @@ -3445,31 +3445,23 @@ static LRESULT CALLBACK TREEVIEW_Edit_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - TREEVIEW_INFO *infoPtr; + TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(GetParent(hwnd)); BOOL bCancel = FALSE; + LRESULT rc; switch (uMsg) { case WM_PAINT: - { - LRESULT rc; - TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(GetParent(hwnd)); - - TRACE("WM_PAINT start\n"); - rc = CallWindowProcA(infoPtr->wpEditOrig, hwnd, uMsg, wParam, + TRACE("WM_PAINT start\n"); + rc = CallWindowProcA(infoPtr->wpEditOrig, hwnd, uMsg, wParam, lParam); - TRACE("WM_PAINT done\n"); - return rc; - } + TRACE("WM_PAINT done\n"); + return rc; case WM_KILLFOCUS: - { - TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(GetParent(hwnd)); if (infoPtr->bIgnoreEditKillFocus) return TRUE; - break; - } case WM_GETDLGCODE: return DLGC_WANTARROWS | DLGC_WANTALLKEYS; @@ -3487,18 +3479,12 @@ /* fall through */ default: - { - TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(GetParent(hwnd)); - - return CallWindowProcA(infoPtr->wpEditOrig, hwnd, uMsg, wParam, - lParam); - } + return CallWindowProcA(infoPtr->wpEditOrig, hwnd, uMsg, wParam, lParam); } /* Processing TVN_ENDLABELEDIT message could kill the focus */ /* eg. Using a messagebox */ - infoPtr = TREEVIEW_GetInfoPtr(GetParent(hwnd)); infoPtr->bIgnoreEditKillFocus = TRUE; TREEVIEW_EndEditLabelNow(infoPtr, bCancel || !infoPtr->bLabelChanged); infoPtr->bIgnoreEditKillFocus = FALSE; @@ -3570,7 +3556,7 @@ } default: - return SendMessageA(GetParent(infoPtr->hwnd), WM_COMMAND, wParam, lParam); + return SendMessageA(infoPtr->hwndNotify, WM_COMMAND, wParam, lParam); } return 0; -- Dimi.