Wnd->Instance = hInstance;
Window->hSelf = hWnd;
- if (!hMenu)
- hMenu = Wnd->Class->hMenu;
-
- if (0 != (dwStyle & WS_CHILD))
- {
- Wnd->IDMenu = (UINT) hMenu;
- }
- else
- {
- IntSetMenu(Window, hMenu, &MenuChanged);
- }
-
Window->MessageQueue = PsGetCurrentThreadWin32Thread()->MessageQueue;
IntReferenceMessageQueue(Window->MessageQueue);
Window->Parent = ParentWindow;
}
/* create system menu */
- if((dwStyle & WS_SYSMENU) &&
- (dwStyle & WS_CAPTION) == WS_CAPTION)
+ if((dwStyle & WS_SYSMENU) )//&& (dwStyle & WS_CAPTION) == WS_CAPTION)
{
SystemMenu = IntGetSystemMenu(Window, TRUE, TRUE);
if(SystemMenu)
}
}
+ /* Set the window menu */
+ if ((dwStyle & (WS_CHILD | WS_POPUP)) != WS_CHILD)
+ {
+ if (hMenu)
+ IntSetMenu(Window, hMenu, &MenuChanged);
+ else
+ {
+ hMenu = Wnd->Class->hMenu;
+ if (hMenu) IntSetMenu(Window, hMenu, &MenuChanged);
+ }
+ }
+ else
+ Wnd->IDMenu = (UINT) hMenu;
+
/* Insert the window into the thread's window list. */
InsertTailList (&PsGetCurrentThreadWin32Thread()->WindowListHead, &Window->ThreadListEntry);
RETURN((HWND)0);
}
-
/* Send move and size messages. */
if (!(Window->Flags & WINDOWOBJECT_NEED_SIZE))
{
DPRINT("Sending bogus WM_SIZE\n");
}
-
lParam = MAKE_LONG(Window->Wnd->ClientRect.right -
Window->Wnd->ClientRect.left,
Window->Wnd->ClientRect.bottom -
co_IntSendMessage(Window->hSelf, WM_SIZE, SIZE_RESTORED,
lParam);
-
DPRINT("IntCreateWindow(): About to send WM_MOVE\n");
if (0 != (Wnd->Style & WS_CHILD) && ParentWindow)
Wnd->ClientRect.top);
}
-
co_IntSendMessage(Window->hSelf, WM_MOVE, 0, lParam);
-
/* Call WNDOBJ change procs */
IntEngWindowChanged(Window, WOC_RGN_CLIENT);
-
-
}
/* Show or maybe minimize or maximize the window. */
SwFlag = (Wnd->Style & WS_MINIMIZE) ? SW_MINIMIZE :
SW_MAXIMIZE;
+
co_WinPosMinMaximize(Window, SwFlag, &NewPos);
- SwFlag =
- ((Wnd->Style & WS_CHILD) || UserGetActiveWindow()) ?
- SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED :
- SWP_NOZORDER | SWP_FRAMECHANGED;
+
+ SwFlag = ((Wnd->Style & WS_CHILD) || UserGetActiveWindow()) ?
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED :
+ SWP_NOZORDER | SWP_FRAMECHANGED;
+
DPRINT("IntCreateWindow(): About to minimize/maximize\n");
DPRINT("%d,%d %dx%d\n", NewPos.left, NewPos.top, NewPos.right, NewPos.bottom);
co_WinPosSetWindowPos(Window, 0, NewPos.left, NewPos.top,
if (dwStyle & WS_VISIBLE)
{
+ if (Wnd->Style & WS_MAXIMIZE)
+ dwShowMode = SW_SHOW;
+ else if (Wnd->Style & WS_MINIMIZE)
+ dwShowMode = SW_SHOWMINIMIZED;
+
DPRINT("IntCreateWindow(): About to show window\n");
co_WinPosShowWindow(Window, dwShowMode);
+
+ if (Wnd->ExStyle & WS_EX_MDICHILD)
+ {
+ co_IntSendMessage(ParentWindow->hSelf, WM_MDIREFRESHMENU, 0, 0);
+ /* ShowWindow won't activate child windows */
+ co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);
+ }
}
DPRINT("IntCreateWindow(): = %X\n", hWnd);