fixes for GetDlgItemTextA, GetDlgItemTextW and DIALOG_CreateIndirect
from Wine 0.9.2
user32 dialog test failures decreased to 7
Modified: trunk/reactos/lib/user32/windows/dialog.c
_____
Modified: trunk/reactos/lib/user32/windows/dialog.c
--- trunk/reactos/lib/user32/windows/dialog.c 2005-12-02 22:01:52 UTC
(rev 19832)
+++ trunk/reactos/lib/user32/windows/dialog.c 2005-12-02 22:14:03 UTC
(rev 19833)
@@ -825,7 +825,8 @@
{
/* Send initialisation messages and set focus */
- if (SendMessageW( hwnd, WM_INITDIALOG,
(WPARAM)dlgInfo->hwndFocus, param ))
+ if (SendMessageW( hwnd, WM_INITDIALOG,
(WPARAM)dlgInfo->hwndFocus, param ) &&
+ ((~template.style & DS_CONTROL) || (template.style &
WS_VISIBLE)))
{
/* By returning TRUE, app has requested a default focus
assignment */
dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE);
@@ -1911,6 +1912,7 @@
LPSTR lpString,
int nMaxCount)
{
+ if (lpString && (lpString > 0)) lpString[0] = '\0';
return (UINT)SendDlgItemMessageA( hDlg, nIDDlgItem, WM_GETTEXT,
nMaxCount, (LPARAM)lpString );
}
@@ -1926,6 +1928,7 @@
LPWSTR lpString,
int nMaxCount)
{
+ if (lpString && (lpString > 0)) lpString[0] = '\0';
return (UINT)SendDlgItemMessageW( hDlg, nIDDlgItem, WM_GETTEXT,
nMaxCount, (LPARAM)lpString );
}
Show replies by date