/* temp hack */
-PWINDOW_OBJECT FASTCALL UserGetWindowObjectNoRef(HWND hWnd)
+PWINDOW_OBJECT FASTCALL UserGetWindowObject(HWND hWnd)
{
PWINDOW_OBJECT w = IntGetWindowObject(hWnd);
{
NewMenu->MenuInfo.Flags |= MF_SYSMENU | MF_POPUP;
IntReleaseMenuObject(NewMenu);
- UserSetMenuDefaultItem(NewMenu->MenuInfo.Self, SC_CLOSE, FALSE);
+ UserSetMenuDefaultItem(NewMenu, SC_CLOSE, FALSE);
ItemInfo.cbSize = sizeof(MENUITEMINFOW);
ItemInfo.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_STATE | MIIM_SUBMENU;
{
PWINDOW_OBJECT BaseWindow, Window;
- if(!(BaseWindow = UserGetWindowObjectNoRef(Child)))
+ if(!(BaseWindow = UserGetWindowObject(Child)))
{
return FALSE;
}
IntReleaseWindowObject(ParentWindow);
}
+ //faxme:temp hack
+ UserReferenceWindowObjectCo(Window);
/* Initialize and show the window's scrollbars */
if (Window->Style & WS_VSCROLL)
{
- co_UserShowScrollBar(Window->hSelf, SB_VERT, TRUE);
+ co_UserShowScrollBar(Window, SB_VERT, TRUE);
}
if (Window->Style & WS_HSCROLL)
{
- co_UserShowScrollBar(Window->hSelf, SB_HORZ, TRUE);
+ co_UserShowScrollBar(Window, SB_HORZ, TRUE);
}
+ UserDereferenceWindowObjectCo(Window);
if (dwStyle & WS_VISIBLE)
{
HMENU STDCALL
NtUserGetSystemMenu(HWND hWnd, BOOL bRevert)
{
- HMENU Result = 0;
PWINDOW_OBJECT Window;
PMENU_OBJECT Menu;
DECLARE_RETURN(HMENU);
DPRINT("Enter NtUserGetSystemMenu\n");
UserEnterShared();
- if (!(Window = IntGetWindowObject(hWnd)))
+ if (!(Window = UserGetWindowObject(hWnd)))
{
- SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
- RETURN( 0);
+ RETURN(NULL);
}
if (!(Menu = IntGetSystemMenu(Window, bRevert, FALSE)))
{
- Result = Menu->MenuInfo.Self;
- IntReleaseMenuObject(Menu);
+ RETURN(NULL);
}
- IntReleaseWindowObject(Window);
- RETURN( Result);
+ RETURN(Menu->MenuInfo.Self);
CLEANUP:
DPRINT("Leave NtUserGetSystemMenu, ret=%i\n",_ret_);
PWINDOW_OBJECT Parent, Window;
HWND hWndResult = NULL;
- if (!(Window = UserGetWindowObjectNoRef(hWnd))) return NULL;
+ if (!(Window = UserGetWindowObject(hWnd))) return NULL;
switch (Relationship)
{