Difference between revisions of "Techwiki:Win32k/MENU"

From ReactOS Wiki
Jump to: navigation, search
Line 29: Line 29:
 
     struct tagMENU*    pMenu;
 
     struct tagMENU*    pMenu;
 
  } MENULIST, *PMENULIST;
 
  } MENULIST, *PMENULIST;
 +
 +
// Menu fFlags, upper byte is MNS_X style flags.
 +
#define MNF_POPUP      0x0001 // CreatePopupMenu->InternalCreateMenu(true);
 +
#define MNF_UNDERLINE  0x0004 // if not underlined is ODS_NOACCEL, menustate.fUnderline
 +
#define MNF_INACTIVE    0x0010 // Associated with ODS_INACTIVE
 +
#define MNF_RTOL        0x0020
 +
#define MNF_DESKTOPMN  0x0040 // LockDesktopMenu
 +
#define MNF_SYSDESKMN  0x0080 // xxxLoadSysDesktopMenu
 +
#define MNF_SYSSUBMENU  0x0100 // xxxGetSystemMenu for GetSubMenu
 
   
 
   
 
  typedef struc _MENU
 
  typedef struc _MENU
 
  {
 
  {
 
  /* 000 */ [[Techwiki:win32k/HEAD|PROCDESKHEAD]]  head;
 
  /* 000 */ [[Techwiki:win32k/HEAD|PROCDESKHEAD]]  head;
  /* 014 */ FLONG     fFlags;  // See menuinfo dwStyle.
+
  /* 014 */ ULONG     fFlags;  // See menuinfo dwStyle.
 
  /* 018 */ INT      iItem;
 
  /* 018 */ INT      iItem;
 
  /* 01c */ DWORD    cAlloced;
 
  /* 01c */ DWORD    cAlloced;

Revision as of 03:10, 12 March 2010

Windows XP version of ITEM and MENU

typedef struct _ITEM
{
/* 000 */ UINT    fType;
/* 004 */ UINT    fState;
/* 008 */ UINT    wID;
/* 00c */ struct _MENU *spSubMenu;
/* 010 */ HBITMAP hbmpChecked;
/* 014 */ HBITMAP hbmpUnchecked;
/* 018 */ LPWSTR  lpstr;
/* 01c */ UINT    cch;
/* 020 */ ULONG_PTR dwItemData;
/* 024 */ DWORD   xItem;
/* 028 */ DWORD   yItem;
/* 02c */ DWORD   cxItem;
/* 030 */ DWORD   cyItem;
/* 034 */ DWORD   dxTab;
/* 038 */ DWORD   ulX;
/* 03c */ DWORD   ulWidth;
/* 040 */ HBITMAP hbmp;
/* 044 */ DWORD   cxBmp;
/* 048 */ DWORD   cyBmp;
} ITEM, *PITEM;

typedef struct tagMENULIST
{
   struct tagMENULIST* pNext;
   struct tagMENU*     pMenu;
} MENULIST, *PMENULIST;

// Menu fFlags, upper byte is MNS_X style flags.
#define MNF_POPUP       0x0001 // CreatePopupMenu->InternalCreateMenu(true);
#define MNF_UNDERLINE   0x0004 // if not underlined is ODS_NOACCEL, menustate.fUnderline
#define MNF_INACTIVE    0x0010 // Associated with ODS_INACTIVE
#define MNF_RTOL        0x0020
#define MNF_DESKTOPMN   0x0040 // LockDesktopMenu
#define MNF_SYSDESKMN   0x0080 // xxxLoadSysDesktopMenu
#define MNF_SYSSUBMENU  0x0100 // xxxGetSystemMenu for GetSubMenu

typedef struc _MENU
{
/* 000 */ PROCDESKHEAD  head;
/* 014 */ ULONG     fFlags;  // See menuinfo dwStyle.
/* 018 */ INT       iItem;
/* 01c */ DWORD     cAlloced;
/* 020 */ DWORD     cItems;
/* 024 */ DWORD     cxMenu;
/* 028 */ DWORD     cyMenu;
/* 02c */ DWORD     cxTextAlign;
/* 030 */ PWND      spwndNotify;
/* 034 */ PITEM     rgItems;
/* 038 */ PMENULIST pParentMenus; // See Note 1.
/* 03c */ DWORD     dwContextHelpId;
/* 040 */ UINT      cyMax;
/* 044 */ ULONG_PTR dwMenuData;
/* 048 */ HBRUSH    hbrBack;
/* 04c */ INT       iTop;
/* 050 */ INT       iMaxTop;
/* 054 */ DWORD     dwArrowsOn:2; //Arrows: 0 off, 1 on, 2 to the top, 3 to the bottom.
} MENU, *PMENU;

NOTE:

1. Pointer to a linked list of parent menu pointers. Allocated by DesktopAlloc with a size of 8 in xxxSetLPITEMInfo.

References

  • msdn MENUINFO
  • msdn MENUITEMINFO
  • "Undocumented Windows, A Programmer's Guide to Reserved MS Win API Functions", page 473 - 477.
  • Windows Symbol files, userkdx.dll, !dso, w7u