mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
Fix the order of window style setting.
svn path=/trunk/; revision=17942
This commit is contained in:
parent
ac73d1e005
commit
86ae753de1
1 changed files with 10 additions and 13 deletions
|
@ -1468,10 +1468,6 @@ co_IntCreateWindowEx(DWORD dwExStyle,
|
||||||
|
|
||||||
InsertTailList(&Class->ClassWindowsListHead, &Window->ClassListEntry);
|
InsertTailList(&Class->ClassWindowsListHead, &Window->ClassListEntry);
|
||||||
|
|
||||||
Window->ExStyle = dwExStyle;
|
|
||||||
Window->Style = dwStyle & ~WS_VISIBLE;
|
|
||||||
DPRINT("1: Style is now %lx\n", Window->Style);
|
|
||||||
|
|
||||||
Window->SystemMenu = (HMENU)0;
|
Window->SystemMenu = (HMENU)0;
|
||||||
Window->ContextHelpId = 0;
|
Window->ContextHelpId = 0;
|
||||||
Window->IDMenu = 0;
|
Window->IDMenu = 0;
|
||||||
|
@ -1571,19 +1567,19 @@ co_IntCreateWindowEx(DWORD dwExStyle,
|
||||||
/* Correct the window style. */
|
/* Correct the window style. */
|
||||||
if (!(dwStyle & WS_CHILD))
|
if (!(dwStyle & WS_CHILD))
|
||||||
{
|
{
|
||||||
Window->Style |= WS_CLIPSIBLINGS;
|
dwStyle |= WS_CLIPSIBLINGS;
|
||||||
DPRINT("3: Style is now %lx\n", Window->Style);
|
DPRINT("3: Style is now %lx\n", dwStyle);
|
||||||
if (!(dwStyle & WS_POPUP))
|
if (!(dwStyle & WS_POPUP))
|
||||||
{
|
{
|
||||||
Window->Style |= WS_CAPTION;
|
dwStyle |= WS_CAPTION;
|
||||||
Window->Flags |= WINDOWOBJECT_NEED_SIZE;
|
Window->Flags |= WINDOWOBJECT_NEED_SIZE;
|
||||||
DPRINT("4: Style is now %lx\n", Window->Style);
|
DPRINT("4: Style is now %lx\n", dwStyle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create system menu */
|
/* create system menu */
|
||||||
if((Window->Style & WS_SYSMENU) &&
|
if((dwStyle & WS_SYSMENU) &&
|
||||||
(Window->Style & WS_CAPTION) == WS_CAPTION)
|
(dwStyle & WS_CAPTION) == WS_CAPTION)
|
||||||
{
|
{
|
||||||
SystemMenu = IntGetSystemMenu(Window, TRUE, TRUE);
|
SystemMenu = IntGetSystemMenu(Window, TRUE, TRUE);
|
||||||
if(SystemMenu)
|
if(SystemMenu)
|
||||||
|
@ -1608,6 +1604,9 @@ co_IntCreateWindowEx(DWORD dwExStyle,
|
||||||
Size.cx = nWidth;
|
Size.cx = nWidth;
|
||||||
Size.cy = nHeight;
|
Size.cy = nHeight;
|
||||||
|
|
||||||
|
Window->ExStyle = dwExStyle;
|
||||||
|
Window->Style = dwStyle & ~WS_VISIBLE;
|
||||||
|
|
||||||
/* call hook */
|
/* call hook */
|
||||||
Cs.lpCreateParams = lpParam;
|
Cs.lpCreateParams = lpParam;
|
||||||
Cs.hInstance = hInstance;
|
Cs.hInstance = hInstance;
|
||||||
|
@ -1617,7 +1616,7 @@ co_IntCreateWindowEx(DWORD dwExStyle,
|
||||||
Cs.cy = Size.cy;
|
Cs.cy = Size.cy;
|
||||||
Cs.x = Pos.x;
|
Cs.x = Pos.x;
|
||||||
Cs.y = Pos.y;
|
Cs.y = Pos.y;
|
||||||
Cs.style = dwStyle;
|
Cs.style = Window->Style;
|
||||||
Cs.lpszName = (LPCWSTR) WindowName;
|
Cs.lpszName = (LPCWSTR) WindowName;
|
||||||
Cs.lpszClass = (LPCWSTR) ClassName;
|
Cs.lpszClass = (LPCWSTR) ClassName;
|
||||||
Cs.dwExStyle = dwExStyle;
|
Cs.dwExStyle = dwExStyle;
|
||||||
|
@ -2569,13 +2568,11 @@ PWINDOW_OBJECT FASTCALL UserGetAncestor(PWINDOW_OBJECT Wnd, UINT Type)
|
||||||
|
|
||||||
case GA_ROOT:
|
case GA_ROOT:
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT tmp;
|
|
||||||
WndAncestor = Wnd;
|
WndAncestor = Wnd;
|
||||||
Parent = NULL;
|
Parent = NULL;
|
||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
tmp = Parent;
|
|
||||||
if(!(Parent = WndAncestor->Parent))
|
if(!(Parent = WndAncestor->Parent))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue