mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Don't allow setting menu for child windows in IntSetMenu.
svn path=/trunk/; revision=16735
This commit is contained in:
parent
c5646382a5
commit
ead342935a
1 changed files with 7 additions and 1 deletions
|
@ -499,13 +499,19 @@ IntSetMenu(
|
|||
{
|
||||
PMENU_OBJECT OldMenuObject, NewMenuObject = NULL;
|
||||
|
||||
if ((WindowObject->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*Changed = (WindowObject->IDMenu != (UINT) Menu);
|
||||
if (! *Changed)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (0 != WindowObject->IDMenu)
|
||||
if (WindowObject->IDMenu)
|
||||
{
|
||||
OldMenuObject = IntGetMenuObject((HMENU) WindowObject->IDMenu);
|
||||
ASSERT(NULL == OldMenuObject || OldMenuObject->MenuInfo.Wnd == WindowObject->Self);
|
||||
|
|
Loading…
Reference in a new issue