- Use internal function to validate menu handle. See CORE-11479 for more information.

svn path=/trunk/; revision=71704
This commit is contained in:
James Tabor 2016-06-30 15:48:20 +00:00
parent 876a3b2681
commit e95ca2d8b7
3 changed files with 12 additions and 1 deletions

View file

@ -242,6 +242,15 @@ PMENU FASTCALL VerifyMenu(PMENU pMenu)
return pMenu;
}
BOOL
FASTCALL
IntIsMenu(HMENU Menu)
{
if (UserGetMenuObject(Menu)) return TRUE;
return FALSE;
}
PMENU WINAPI
IntGetMenu(HWND hWnd)
{

View file

@ -122,6 +122,8 @@ typedef struct tagROSMENUITEMINFO
//
//
BOOL FASTCALL IntIsMenu(HMENU);
PMENU FASTCALL
IntGetMenuObject(HMENU hMenu);

View file

@ -16,7 +16,7 @@ extern ATOM AtomFlashWndState;
#define HAS_THINFRAME(Style, ExStyle) \
(((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
#define HAS_MENU(pWnd,style) ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) && pWnd->IDMenu)
#define HAS_MENU(pWnd,style) ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) && IntIsMenu(UlongToHandle(pWnd->IDMenu)))
#define IntIsDesktopWindow(WndObj) \
(WndObj->spwndParent == NULL)