Return empty string on error in WM_GETTEXT.

This commit is contained in:
Carl Sopchak 2002-07-19 03:13:10 +00:00 committed by Alexandre Julliard
parent 3635056577
commit e833248d58
1 changed files with 9 additions and 0 deletions

View File

@ -1603,6 +1603,15 @@ static LRESULT COMBO_GetText( LPHEADCOMBO lphc, INT N, LPARAM lParam, BOOL unico
return (LRESULT)n;
}
}
/* LB_GETCURSEL returned LB_ERR - truncate string, return zero */
if (unicode)
{
LPWSTR lpText = (LPWSTR)lParam;
lpText[0] = '\0';
} else {
LPSTR lpText = (LPSTR)lParam;
lpText[0] = '\0';
}
return 0;
}