fixes for GetDlgItemTextA, GetDlgItemTextW and DIALOG_CreateIndirect from Wine 0.9.2

user32 dialog test failures decreased to 7

svn path=/trunk/; revision=19833
This commit is contained in:
Sebastian Gasiorek 2005-12-02 22:14:03 +00:00
parent d20fedcdd0
commit f8d5ea2d87

View file

@ -825,7 +825,8 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
{
/* 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 @@ GetDlgItemTextA(
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 @@ GetDlgItemTextW(
LPWSTR lpString,
int nMaxCount)
{
if (lpString && (lpString > 0)) lpString[0] = '\0';
return (UINT)SendDlgItemMessageW( hDlg, nIDDlgItem, WM_GETTEXT, nMaxCount, (LPARAM)lpString );
}