https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2e9d03da90c00c96170b1…
commit 2e9d03da90c00c96170b1def93712217d48eb862
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Fri Aug 4 22:29:05 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Fri Aug 4 22:29:05 2023 +0900
[SHELL32][SDK] Implement SHLimitInputCombo (#5521)
SHLimitInputCombo function sets limits on valid characters for a combobox control.
This function works like SHLimitInputEdit, but the target is a combobox instead of a
textbox.
CORE-9277
---
dll/win32/shell32/stubs.cpp | 11 -----------
dll/win32/shell32/wine/shellord.c | 23 +++++++++++++++++++++++
sdk/include/reactos/undocshell.h | 2 ++
3 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/dll/win32/shell32/stubs.cpp b/dll/win32/shell32/stubs.cpp
index 2d49322a184..460a423206c 100644
--- a/dll/win32/shell32/stubs.cpp
+++ b/dll/win32/shell32/stubs.cpp
@@ -36,17 +36,6 @@ SHFindComputer(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
return FALSE;
}
-/*
- * Unimplemented
- */
-EXTERN_C BOOL
-WINAPI
-SHLimitInputCombo(HWND hWnd, LPVOID lpUnknown)
-{
- FIXME("SHLimitInputCombo() stub\n");
- return FALSE;
-}
-
/*
* Unimplemented
*/
diff --git a/dll/win32/shell32/wine/shellord.c b/dll/win32/shell32/wine/shellord.c
index fde33759c2a..43c3775c0e8 100644
--- a/dll/win32/shell32/wine/shellord.c
+++ b/dll/win32/shell32/wine/shellord.c
@@ -2815,3 +2815,26 @@ SHLimitInputEdit(HWND hWnd, IShellFolder *psf)
return hr;
}
+
+#ifdef __REACTOS__
+/*************************************************************************
+ * SHLimitInputCombo [SHELL32.748]
+ *
+ * Sets limits on valid characters for a combobox control.
+ * This function works like SHLimitInputEdit, but the target is a combobox
+ * instead of a textbox.
+ */
+HRESULT WINAPI
+SHLimitInputCombo(HWND hWnd, IShellFolder *psf)
+{
+ HWND hwndEdit;
+
+ TRACE("%p %p\n", hWnd, psf);
+
+ hwndEdit = GetTopWindow(hWnd);
+ if (!hwndEdit)
+ return E_FAIL;
+
+ return SHLimitInputEdit(hwndEdit, psf);
+}
+#endif
diff --git a/sdk/include/reactos/undocshell.h b/sdk/include/reactos/undocshell.h
index 7aeb796c8b7..9196713ef6d 100644
--- a/sdk/include/reactos/undocshell.h
+++ b/sdk/include/reactos/undocshell.h
@@ -644,6 +644,8 @@ BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
#define SMC_EXEC 4
INT WINAPI Shell_GetCachedImageIndex(LPCWSTR szPath, INT nIndex, UINT bSimulateDoc);
+HRESULT WINAPI SHLimitInputCombo(HWND hWnd, IShellFolder *psf);
+
HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv);
BOOL WINAPI GUIDFromStringW(