Commit 6443ee58 authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Cleanup the edit wndproc a bit.

parent e5762652
...@@ -3445,31 +3445,23 @@ TREEVIEW_GetEditControl(TREEVIEW_INFO *infoPtr) ...@@ -3445,31 +3445,23 @@ TREEVIEW_GetEditControl(TREEVIEW_INFO *infoPtr)
static LRESULT CALLBACK static LRESULT CALLBACK
TREEVIEW_Edit_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) TREEVIEW_Edit_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
TREEVIEW_INFO *infoPtr; TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(GetParent(hwnd));
BOOL bCancel = FALSE; BOOL bCancel = FALSE;
LRESULT rc;
switch (uMsg) switch (uMsg)
{ {
case WM_PAINT: case WM_PAINT:
{ TRACE("WM_PAINT start\n");
LRESULT rc; rc = CallWindowProcA(infoPtr->wpEditOrig, hwnd, uMsg, wParam,
TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(GetParent(hwnd));
TRACE("WM_PAINT start\n");
rc = CallWindowProcA(infoPtr->wpEditOrig, hwnd, uMsg, wParam,
lParam); lParam);
TRACE("WM_PAINT done\n"); TRACE("WM_PAINT done\n");
return rc; return rc;
}
case WM_KILLFOCUS: case WM_KILLFOCUS:
{
TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(GetParent(hwnd));
if (infoPtr->bIgnoreEditKillFocus) if (infoPtr->bIgnoreEditKillFocus)
return TRUE; return TRUE;
break; break;
}
case WM_GETDLGCODE: case WM_GETDLGCODE:
return DLGC_WANTARROWS | DLGC_WANTALLKEYS; return DLGC_WANTARROWS | DLGC_WANTALLKEYS;
...@@ -3487,18 +3479,12 @@ TREEVIEW_Edit_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -3487,18 +3479,12 @@ TREEVIEW_Edit_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
/* fall through */ /* fall through */
default: default:
{ return CallWindowProcA(infoPtr->wpEditOrig, hwnd, uMsg, wParam, lParam);
TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(GetParent(hwnd));
return CallWindowProcA(infoPtr->wpEditOrig, hwnd, uMsg, wParam,
lParam);
}
} }
/* Processing TVN_ENDLABELEDIT message could kill the focus */ /* Processing TVN_ENDLABELEDIT message could kill the focus */
/* eg. Using a messagebox */ /* eg. Using a messagebox */
infoPtr = TREEVIEW_GetInfoPtr(GetParent(hwnd));
infoPtr->bIgnoreEditKillFocus = TRUE; infoPtr->bIgnoreEditKillFocus = TRUE;
TREEVIEW_EndEditLabelNow(infoPtr, bCancel || !infoPtr->bLabelChanged); TREEVIEW_EndEditLabelNow(infoPtr, bCancel || !infoPtr->bLabelChanged);
infoPtr->bIgnoreEditKillFocus = FALSE; infoPtr->bIgnoreEditKillFocus = FALSE;
...@@ -3570,7 +3556,7 @@ TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam) ...@@ -3570,7 +3556,7 @@ TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
} }
default: default:
return SendMessageA(GetParent(infoPtr->hwnd), WM_COMMAND, wParam, lParam); return SendMessageA(infoPtr->hwndNotify, WM_COMMAND, wParam, lParam);
} }
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment