user: Call SetLastError in CreateWindowEx when WS_CHILD is set with no parent.
This commit is contained in:
parent
5048685970
commit
74ece17c6b
|
@ -140,7 +140,7 @@ static void test_parent_owner(void)
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
test = CreateWindowExA(0, "ToolWindowClass", "Tool window 1",
|
test = CreateWindowExA(0, "ToolWindowClass", "Tool window 1",
|
||||||
WS_CHILD, 0, 0, 100, 100, 0, 0, 0, NULL );
|
WS_CHILD, 0, 0, 100, 100, 0, 0, 0, NULL );
|
||||||
todo_wine ok( GetLastError() == ERROR_TLW_WITH_WSCHILD, "CreateWindowExA should call SetLastError\n" );
|
ok( GetLastError() == ERROR_TLW_WITH_WSCHILD, "CreateWindowExA should call SetLastError\n" );
|
||||||
ok( !test, "WS_CHILD without parent created\n" );
|
ok( !test, "WS_CHILD without parent created\n" );
|
||||||
|
|
||||||
/* desktop window */
|
/* desktop window */
|
||||||
|
|
|
@ -995,6 +995,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom, UINT flags )
|
||||||
if ((cs->style & (WS_CHILD|WS_POPUP)) == WS_CHILD)
|
if ((cs->style & (WS_CHILD|WS_POPUP)) == WS_CHILD)
|
||||||
{
|
{
|
||||||
WARN("No parent for child window\n" );
|
WARN("No parent for child window\n" );
|
||||||
|
SetLastError(ERROR_TLW_WITH_WSCHILD);
|
||||||
return 0; /* WS_CHILD needs a parent, but WS_POPUP doesn't */
|
return 0; /* WS_CHILD needs a parent, but WS_POPUP doesn't */
|
||||||
}
|
}
|
||||||
if (classAtom != LOWORD(DESKTOP_CLASS_ATOM)) /* are we creating the desktop itself? */
|
if (classAtom != LOWORD(DESKTOP_CLASS_ATOM)) /* are we creating the desktop itself? */
|
||||||
|
|
Loading…
Reference in New Issue