mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[Win32k]
- Fix load menu callback. Use it for loading system menus. - Sync in more wine code, fix sub-menu arrow drawing. See WinMerge. - Miscellaneous code changes. svn path=/trunk/; revision=63380
This commit is contained in:
parent
a3fe90d0d0
commit
8546e5f645
|
@ -81,6 +81,7 @@ typedef struct _EVENTPROC_CALLBACK_ARGUMENTS
|
|||
typedef struct _LOADMENU_CALLBACK_ARGUMENTS
|
||||
{
|
||||
HINSTANCE hModule;
|
||||
LPCWSTR InterSource;
|
||||
WCHAR MenuName[1];
|
||||
} LOADMENU_CALLBACK_ARGUMENTS, *PLOADMENU_CALLBACK_ARGUMENTS;
|
||||
|
||||
|
|
|
@ -884,7 +884,7 @@ co_IntCallLoadMenu( HINSTANCE hModule,
|
|||
if (pMenuName->Length)
|
||||
RtlCopyMemory(&Common->MenuName, pMenuName->Buffer, pMenuName->Length);
|
||||
else
|
||||
RtlCopyMemory(&Common->MenuName, &pMenuName->Buffer, sizeof(WCHAR));
|
||||
Common->InterSource = pMenuName->Buffer;
|
||||
|
||||
ResultPointer = NULL;
|
||||
ResultLength = sizeof(LRESULT);
|
||||
|
|
|
@ -901,7 +901,9 @@ IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu)
|
|||
PMENU Menu, NewMenu = NULL, SysMenu = NULL, ret = NULL;
|
||||
PTHREADINFO W32Thread;
|
||||
HMENU hNewMenu, hSysMenu;
|
||||
ROSMENUITEMINFO ItemInfoSet = {0};
|
||||
ROSMENUITEMINFO ItemInfo = {0};
|
||||
UNICODE_STRING MenuName;
|
||||
|
||||
if(bRevert)
|
||||
{
|
||||
|
@ -952,14 +954,21 @@ IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu)
|
|||
}
|
||||
SysMenu->fFlags |= MNF_SYSDESKMN;
|
||||
SysMenu->hWnd = Window->head.h;
|
||||
hNewMenu = co_IntLoadSysMenuTemplate();
|
||||
//hNewMenu = co_IntLoadSysMenuTemplate();
|
||||
//if ( Window->ExStyle & WS_EX_MDICHILD )
|
||||
//hNewMenu = co_IntCallLoadMenu( NULL, L"SYSMENUMDI");
|
||||
// else
|
||||
//hNewMenu = co_IntCallLoadMenu( NULL, L"SYSMENU");
|
||||
// Do the rest in here.
|
||||
//{
|
||||
// RtlInitUnicodeString( &MenuName, L"SYSMENUMDI");
|
||||
// hNewMenu = co_IntCallLoadMenu( hModClient, &MenuName);
|
||||
//}
|
||||
//else
|
||||
{
|
||||
RtlInitUnicodeString( &MenuName, L"SYSMENU");
|
||||
hNewMenu = co_IntCallLoadMenu( hModClient, &MenuName);
|
||||
//ERR("%wZ\n",&MenuName);
|
||||
}
|
||||
if(!hNewMenu)
|
||||
{
|
||||
ERR("No Menu!!\n");
|
||||
IntReleaseMenuObject(SysMenu);
|
||||
UserDestroyMenu(hSysMenu);
|
||||
return NULL;
|
||||
|
@ -972,6 +981,21 @@ IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// Do the rest in here.
|
||||
|
||||
Menu->fFlags |= MNS_CHECKORBMP | MNF_SYSDESKMN | MNF_POPUP;
|
||||
|
||||
ItemInfoSet.cbSize = sizeof( MENUITEMINFOW);
|
||||
ItemInfoSet.fMask = MIIM_BITMAP;
|
||||
ItemInfoSet.hbmpItem = HBMMENU_POPUP_CLOSE;
|
||||
IntMenuItemInfo(Menu, SC_CLOSE, FALSE, &ItemInfoSet, TRUE, NULL);
|
||||
ItemInfoSet.hbmpItem = HBMMENU_POPUP_RESTORE;
|
||||
IntMenuItemInfo(Menu, SC_RESTORE, FALSE, &ItemInfoSet, TRUE, NULL);
|
||||
ItemInfoSet.hbmpItem = HBMMENU_POPUP_MAXIMIZE;
|
||||
IntMenuItemInfo(Menu, SC_MAXIMIZE, FALSE, &ItemInfoSet, TRUE, NULL);
|
||||
ItemInfoSet.hbmpItem = HBMMENU_POPUP_MINIMIZE;
|
||||
IntMenuItemInfo(Menu, SC_MINIMIZE, FALSE, &ItemInfoSet, TRUE, NULL);
|
||||
|
||||
NewMenu = IntCloneMenu(Menu);
|
||||
if(NewMenu)
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue