mirror of
https://github.com/reactos/reactos.git
synced 2025-05-30 14:39:46 +00:00
[SHELL32] Fix and improve SHLimitInputEdit
Use CallWindowProcW to call the subclass window procedure. Use Wide functions explicitly. CORE-11701
This commit is contained in:
parent
065a0bbf0f
commit
ea8a6d6fb7
1 changed files with 9 additions and 9 deletions
|
@ -2153,7 +2153,7 @@ BOOL WINAPI IsUserAnAdmin(VOID)
|
|||
* SHLimitInputEdit(SHELL32.@)
|
||||
*/
|
||||
|
||||
/* TODO: Show baloon popup window using SetWindowRgn */
|
||||
/* TODO: Show baloon popup window with TTS_BALLOON */
|
||||
|
||||
typedef struct UxSubclassInfo
|
||||
{
|
||||
|
@ -2174,7 +2174,7 @@ UxSubclassInfo_Destroy(UxSubclassInfo *pInfo)
|
|||
CoTaskMemFree(pInfo->pwszValidChars);
|
||||
CoTaskMemFree(pInfo->pwszInvalidChars);
|
||||
|
||||
SetWindowLongPtr(pInfo->hwnd, GWLP_WNDPROC, (LONG_PTR)pInfo->fnWndProc);
|
||||
SetWindowLongPtrW(pInfo->hwnd, GWLP_WNDPROC, (LONG_PTR)pInfo->fnWndProc);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, pInfo);
|
||||
}
|
||||
|
@ -2185,7 +2185,7 @@ LimitEditWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
WNDPROC fnWndProc;
|
||||
UxSubclassInfo *pInfo = GetPropW(hwnd, L"UxSubclassInfo");
|
||||
if (!pInfo)
|
||||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
||||
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
fnWndProc = pInfo->fnWndProc;
|
||||
|
||||
|
@ -2209,7 +2209,7 @@ LimitEditWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
}
|
||||
}
|
||||
return fnWndProc(hwnd, uMsg, wParam, lParam);
|
||||
return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
case WM_IME_CHAR:
|
||||
|
@ -2237,17 +2237,17 @@ LimitEditWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
}
|
||||
}
|
||||
return fnWndProc(hwnd, uMsg, wParam, lParam);
|
||||
return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
case WM_NCDESTROY:
|
||||
{
|
||||
UxSubclassInfo_Destroy(pInfo);
|
||||
return fnWndProc(hwnd, uMsg, wParam, lParam);
|
||||
return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
default:
|
||||
return fnWndProc(hwnd, uMsg, wParam, lParam);
|
||||
return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -2266,10 +2266,10 @@ UxSubclassInfo_Create(HWND hwnd, LPWSTR valid, LPWSTR invalid)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
pInfo->fnWndProc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)LimitEditWindowProc);
|
||||
pInfo->fnWndProc = (WNDPROC)SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)LimitEditWindowProc);
|
||||
if (!pInfo->fnWndProc)
|
||||
{
|
||||
ERR("SetWindowLongPtr failed\n");
|
||||
ERR("SetWindowLongPtrW failed\n");
|
||||
CoTaskMemFree(valid);
|
||||
CoTaskMemFree(invalid);
|
||||
HeapFree(GetProcessHeap(), 0, pInfo);
|
||||
|
|
Loading…
Reference in a new issue