From e1207737c2261010c1bf0407e80b4e79663b217c Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sat, 10 Dec 2011 07:03:33 +0000 Subject: [PATCH] - Fix dialog themes support for get text. svn path=/trunk/; revision=54636 --- reactos/dll/win32/user32/windows/dialog.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/user32/windows/dialog.c b/reactos/dll/win32/user32/windows/dialog.c index 414e1780680..1a8071666f4 100644 --- a/reactos/dll/win32/user32/windows/dialog.c +++ b/reactos/dll/win32/user32/windows/dialog.c @@ -2148,8 +2148,10 @@ GetDlgItemTextA( LPSTR lpString, int nMaxCount) { - if (lpString && (nMaxCount > 0)) lpString[0] = '\0'; - return (UINT)SendDlgItemMessageA( hDlg, nIDDlgItem, WM_GETTEXT, nMaxCount, (LPARAM)lpString ); + HWND hWnd = GetDlgItem(hDlg, nIDDlgItem); + if ( hWnd ) return GetWindowTextA(hWnd, lpString, nMaxCount); + if ( nMaxCount ) *lpString = 0; + return 0; } @@ -2164,8 +2166,10 @@ GetDlgItemTextW( LPWSTR lpString, int nMaxCount) { - if (lpString && (nMaxCount > 0)) lpString[0] = '\0'; - return (UINT)SendDlgItemMessageW( hDlg, nIDDlgItem, WM_GETTEXT, nMaxCount, (LPARAM)lpString ); + HWND hWnd = GetDlgItem(hDlg, nIDDlgItem); + if ( hWnd ) return GetWindowTextW(hWnd, lpString, nMaxCount); + if ( nMaxCount ) *lpString = 0; + return 0; } /*