case WM_PAINT:
{
PAINTSTRUCT ps;
- BeginPaint(Wnd, &ps);
+ NtUserBeginPaint(Wnd, &ps);
MenuDrawPopupMenu(Wnd, ps.hdc, (HMENU)GetWindowLongPtrW(Wnd, 0));
- EndPaint(Wnd, &ps);
+ NtUserEndPaint(Wnd, &ps);
return 0;
}
return NULL;
if (!(res = MENUEX_ParseResource(res, mii.hSubMenu)))
{
- DestroyMenu(mii.hSubMenu);
+ NtUserDestroyMenu(mii.hSubMenu);
return NULL;
}
mii.fMask |= MIIM_SUBMENU;
return;
}
- Dc = GetDC(NULL);
+ Dc = NtUserGetDC(NULL);
SelectObject(Dc, hMenuFont);
Start = 0;
{
/* app changed/recreated menu bar entries in WM_INITMENU
Recalculate menu sizes else clicks will not work */
- SetWindowPos(Wnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
- SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED );
+ NtUserSetWindowPos(Wnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED );
}
/* This makes the menus of applications built with Delphi work.
}
/* Display the window */
- SetWindowPos(MenuInfo.Wnd, HWND_TOPMOST, 0, 0, 0, 0,
- SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+ NtUserSetWindowPos(MenuInfo.Wnd, HWND_TOPMOST, 0, 0, 0, 0,
+ SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
UpdateWindow(MenuInfo.Wnd);
return TRUE;
if (0 != (MenuInfo->Flags & MF_POPUP))
{
- Dc = GetDC(MenuInfo->Wnd);
+ Dc = NtUserGetDC(MenuInfo->Wnd);
}
else
{
- Dc = GetDCEx(MenuInfo->Wnd, 0, DCX_CACHE | DCX_WINDOW);
+ Dc = NtUserGetDCEx(MenuInfo->Wnd, 0, DCX_CACHE | DCX_WINDOW);
}
if (NULL == TopPopup)
DefItem = SC_CLOSE;
}
#endif
- SetMenuDefaultItem(Menu, DefItem, MF_BYCOMMAND);
+ NtUserSetMenuDefaultItem(Menu, DefItem, MF_BYCOMMAND);
}
/***********************************************************************
{
if (0 != (MenuInfo->Flags & MF_POPUP))
{
- Dc = GetDC(MenuInfo->Wnd);
+ Dc = NtUserGetDC(MenuInfo->Wnd);
}
else
{
- Dc = GetDCEx(MenuInfo->Wnd, 0, DCX_CACHE | DCX_WINDOW);
+ Dc = NtUserGetDCEx(MenuInfo->Wnd, 0, DCX_CACHE | DCX_WINDOW);
}
SelectObject(Dc, hMenuFont);
{
MenuHideSubPopups(WndOwner, &SubMenuInfo, FALSE);
MenuSelectItem(WndOwner, &SubMenuInfo, NO_SELECTED_ITEM, SendMenuSelect, NULL);
- DestroyWindow(SubMenuInfo.Wnd);
+ NtUserDestroyWindow(SubMenuInfo.Wnd);
SubMenuInfo.Wnd = NULL;
MenuSetRosMenuInfo(&SubMenuInfo);
}
if (NewWnd != Mt->OwnerWnd)
{
Mt->OwnerWnd = NewWnd;
- SetCapture(Mt->OwnerWnd);
+ NtUserSetCapture(Mt->OwnerWnd);
(void)NtUserSetGUIThreadHandle(MSQ_STATE_MENUOWNER, Mt->OwnerWnd);
}
fEndMenu = ! fRemove;
}
- SetCapture(Mt.OwnerWnd);
+ NtUserSetCapture(Mt.OwnerWnd);
(void)NtUserSetGUIThreadHandle(MSQ_STATE_MENUOWNER, Mt.OwnerWnd);
while (! fEndMenu)
EnterIdleSent = TRUE;
SendMessageW(Mt.OwnerWnd, WM_ENTERIDLE, MSGF_MENU, (LPARAM) Win);
}
- WaitMessage();
+ NtUserWaitMessage();
}
}
}
(void)NtUserSetGUIThreadHandle(MSQ_STATE_MENUOWNER, NULL);
- SetCapture(NULL); /* release the capture */
+ NtUserSetCapture(NULL); /* release the capture */
/* If dropdown is still painted and the close box is clicked on
then the menu will be destroyed as part of the DispatchMessage above.
if (0 != (MenuInfo.Flags & MF_POPUP))
{
- DestroyWindow(MenuInfo.Wnd);
+ NtUserDestroyWindow(MenuInfo.Wnd);
MenuInfo.Wnd = NULL;
}
MenuSelectItem(Mt.OwnerWnd, &MenuInfo, NO_SELECTED_ITEM, FALSE, NULL);
}
-/*
- * @implemented
- */
-BOOL WINAPI
-DeleteMenu(HMENU hMenu,
- UINT uPosition,
- UINT uFlags)
-{
- return NtUserDeleteMenu(hMenu, uPosition, uFlags);
-}
-
-
-/*
- * @implemented
- */
-BOOL WINAPI
-DestroyMenu(HMENU hMenu)
-{
- return NtUserDestroyMenu(hMenu);
-}
-
-
/*
* @implemented
*/
{
GUITHREADINFO guii;
guii.cbSize = sizeof(GUITHREADINFO);
- if(GetGUIThreadInfo(GetCurrentThreadId(), &guii) && guii.hwndMenuOwner)
+ if(NtUserGetGUIThreadInfo(GetCurrentThreadId(), &guii) && guii.hwndMenuOwner)
{
PostMessageW(guii.hwndMenuOwner, WM_CANCELMODE, 0, 0);
}
}
-/*
- * @implemented
- */
-BOOL WINAPI
-GetMenuBarInfo(HWND hwnd,
- LONG idObject,
- LONG idItem,
- PMENUBARINFO pmbi)
-{
- return (BOOL)NtUserGetMenuBarInfo(hwnd, idObject, idItem, pmbi);
-}
-
-
/*
* @implemented
*/
}
-/*
- * @implemented
- */
-BOOL WINAPI
-GetMenuItemRect(HWND hWnd,
- HMENU hMenu,
- UINT uItem,
- LPRECT lprcItem)
-{
- return NtUserGetMenuItemRect( hWnd, hMenu, uItem, lprcItem);
-}
-
-
/*
* @implemented
*/
}
-/*
- * @implemented
- */
-BOOL
-WINAPI
-HiliteMenuItem(
- HWND hwnd,
- HMENU hmenu,
- UINT uItemHilite,
- UINT uHilite)
-{
- return NtUserHiliteMenuItem(hwnd, hmenu, uItemHilite, uHilite);
-}
-
-
-
/*
* @implemented
*/
if (!(hMenu = CreateMenu())) return 0;
if (!MENU_ParseResource(p, hMenu, TRUE))
{
- DestroyMenu(hMenu);
+ NtUserDestroyMenu(hMenu);
return 0;
}
return hMenu;
if (!(hMenu = CreateMenu())) return 0;
if (!MENUEX_ParseResource(p, hMenu))
{
- DestroyMenu( hMenu );
+ NtUserDestroyMenu( hMenu );
return 0;
}
return hMenu;
}
-/*
- * @implemented
- */
-BOOL
-WINAPI
-RemoveMenu(
- HMENU hMenu,
- UINT uPosition,
- UINT uFlags)
-{
- return NtUserRemoveMenu(hMenu, uPosition, uFlags);
-}
-
-
/*
* @implemented
*/
}
-/*
- * @implemented
- */
-BOOL
-WINAPI
-SetMenuDefaultItem(
- HMENU hMenu,
- UINT uItem,
- UINT fByPos)
-{
- return NtUserSetMenuDefaultItem(hMenu, uItem, fByPos);
-}
-
-
/*
* @implemented
*/
}
-/*
- * @implemented
- */
-BOOL
-WINAPI
-SetMenuContextHelpId(HMENU hmenu,
- DWORD dwContextHelpId)
-{
- return NtUserSetMenuContextHelpId(hmenu, dwContextHelpId);
-}
-
-
/*
* @implemented
*/
return AppendMenuW(hMenu, flags &~ MF_APPEND, cmdInsert, lpszNewItem);
case MF_DELETE :
- return DeleteMenu(hMenu, cmd, flags &~ MF_DELETE);
+ return NtUserDeleteMenu(hMenu, cmd, flags &~ MF_DELETE);
case MF_CHANGE :
return ModifyMenuW(hMenu, cmd, flags &~ MF_CHANGE, cmdInsert, lpszNewItem);
case MF_REMOVE :
- return RemoveMenu(hMenu, flags & MF_BYPOSITION ? cmd : cmdInsert,
- flags &~ MF_REMOVE);
+ return NtUserRemoveMenu(hMenu, flags & MF_BYPOSITION ? cmd : cmdInsert,
+ flags &~ MF_REMOVE);
default : /* MF_INSERT */
return InsertMenuW(hMenu, cmd, flags, cmdInsert, lpszNewItem);
return AppendMenuA(hMenu, flags &~ MF_APPEND, cmdInsert, lpszNewItem);
case MF_DELETE :
- return DeleteMenu(hMenu, cmd, flags &~ MF_DELETE);
+ return NtUserDeleteMenu(hMenu, cmd, flags &~ MF_DELETE);
case MF_CHANGE :
return ModifyMenuA(hMenu, cmd, flags &~ MF_CHANGE, cmdInsert, lpszNewItem);
case MF_REMOVE :
- return RemoveMenu(hMenu, flags & MF_BYPOSITION ? cmd : cmdInsert,
- flags &~ MF_REMOVE);
+ return NtUserRemoveMenu(hMenu, flags & MF_BYPOSITION ? cmd : cmdInsert,
+ flags &~ MF_REMOVE);
default : /* MF_INSERT */
return InsertMenuA(hMenu, cmd, flags, cmdInsert, lpszNewItem);