https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ea8a6d6fb78629eab0d36…
commit ea8a6d6fb78629eab0d36291a24716623f3a05b8
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Feb 11 14:10:38 2020 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Tue Feb 11 14:10:38 2020 +0900
[SHELL32] Fix and improve SHLimitInputEdit
Use CallWindowProcW to call the subclass window procedure.
Use Wide functions explicitly.
CORE-11701
---
dll/win32/shell32/wine/shellord.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dll/win32/shell32/wine/shellord.c b/dll/win32/shell32/wine/shellord.c
index f63e0b1a59a..404ecc2a98b 100644
--- a/dll/win32/shell32/wine/shellord.c
+++ b/dll/win32/shell32/wine/shellord.c
@@ -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);