Only set text resource in DefWndProcA on WM_NCCREATE if passed and exists

See issue #4766 for more details.

svn path=/trunk/; revision=42521
This commit is contained in:
Gregor Schneider 2009-08-08 16:14:43 +00:00
parent 3786d6dd01
commit 0656aaaacd

View file

@ -1884,13 +1884,17 @@ DefWindowProcA(HWND hWnd,
{ {
case WM_NCCREATE: case WM_NCCREATE:
{ {
LPCREATESTRUCTA cs = (LPCREATESTRUCTA)lParam; if (lParam)
/* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP) {
* may have child window IDs instead of window name */ LPCREATESTRUCTA cs = (LPCREATESTRUCTA)lParam;
/* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP)
DefSetText(hWnd, (PCWSTR)cs->lpszName, TRUE); * may have child window IDs instead of window name */
if (HIWORD(cs->lpszName))
Result = 1; {
DefSetText(hWnd, (PCWSTR)cs->lpszName, TRUE);
}
Result = 1;
}
break; break;
} }