|
Process Hacker
|
Go to the source code of this file.
Data Structures | |
| struct | _PH_EMENU_ITEM |
| struct | _PH_EMENU_DATA |
Macros | |
| #define | PH_EMENU_DISABLED 0x1 |
| #define | PH_EMENU_CHECKED 0x2 |
| #define | PH_EMENU_HIGHLIGHT 0x4 |
| #define | PH_EMENU_MENUBARBREAK 0x8 |
| #define | PH_EMENU_MENUBREAK 0x10 |
| #define | PH_EMENU_DEFAULT 0x20 |
| #define | PH_EMENU_MOUSESELECT 0x40 |
| #define | PH_EMENU_RADIOCHECK 0x80 |
| #define | PH_EMENU_SEPARATECHECKSPACE 0x100000 |
| #define | PH_EMENU_SEPARATOR 0x200000 |
| #define | PH_EMENU_TEXT_OWNED 0x80000000 |
| #define | PH_EMENU_BITMAP_OWNED 0x40000000 |
| #define | PH_EMENU_FIND_DESCEND 0x1 |
| #define | PH_EMENU_FIND_STARTSWITH 0x2 |
| #define | PH_EMENU_FIND_LITERAL 0x4 |
| #define | PH_EMENU_CONVERT_ID 0x1 |
| #define | PH_EMENU_SHOW_SEND_COMMAND 0x1 |
| #define | PH_EMENU_SHOW_LEFTRIGHT 0x2 |
| #define | PH_EMENU_MODIFY_TEXT 0x1 |
| #define | PH_EMENU_MODIFY_BITMAP 0x2 |
Typedefs | |
| typedef struct _PH_EMENU_ITEM | PH_EMENU_ITEM |
| typedef struct _PH_EMENU_ITEM * | PPH_EMENU_ITEM |
| typedef struct _PH_EMENU_ITEM | PH_EMENU |
| typedef struct _PH_EMENU_ITEM * | PPH_EMENU |
| typedef struct _PH_EMENU_DATA | PH_EMENU_DATA |
| typedef struct _PH_EMENU_DATA * | PPH_EMENU_DATA |
Functions | |
| typedef | VOID (NTAPI *PPH_EMENU_ITEM_DELETE_FUNCTION)(_In_ struct _PH_EMENU_ITEM *Item) |
| PHLIBAPI PPH_EMENU_ITEM | PhCreateEMenuItem (_In_ ULONG Flags, _In_ ULONG Id, _In_ PWSTR Text, _In_opt_ HBITMAP Bitmap, _In_opt_ PVOID Context) |
| Creates a menu item. | |
| PHLIBAPI VOID | PhDestroyEMenuItem (_In_ PPH_EMENU_ITEM Item) |
| Frees resources used by a menu item and its children. | |
| PHLIBAPI PPH_EMENU_ITEM | PhFindEMenuItem (_In_ PPH_EMENU_ITEM Item, _In_ ULONG Flags, _In_opt_ PWSTR Text, _In_opt_ ULONG Id) |
| Finds a child menu item. | |
| PPH_EMENU_ITEM | PhFindEMenuItemEx (_In_ PPH_EMENU_ITEM Item, _In_ ULONG Flags, _In_opt_ PWSTR Text, _In_opt_ ULONG Id, _Out_opt_ PPH_EMENU_ITEM *FoundParent, _Out_opt_ PULONG FoundIndex) |
| Finds a child menu item. | |
| PHLIBAPI ULONG | PhIndexOfEMenuItem (_In_ PPH_EMENU_ITEM Parent, _In_ PPH_EMENU_ITEM Item) |
| Determines the index of a menu item. | |
| PHLIBAPI VOID | PhInsertEMenuItem (_Inout_ PPH_EMENU_ITEM Parent, _Inout_ PPH_EMENU_ITEM Item, _In_ ULONG Index) |
| Inserts a menu item into a parent menu item. | |
| PHLIBAPI BOOLEAN | PhRemoveEMenuItem (_Inout_opt_ PPH_EMENU_ITEM Parent, _In_opt_ PPH_EMENU_ITEM Item, _In_opt_ ULONG Index) |
| Removes a menu item from its parent. | |
| PHLIBAPI VOID | PhRemoveAllEMenuItems (_Inout_ PPH_EMENU_ITEM Parent) |
| Removes all children from a menu item. | |
| PHLIBAPI PPH_EMENU | PhCreateEMenu (VOID) |
| Creates a root menu. | |
| PHLIBAPI VOID | PhDestroyEMenu (_In_ PPH_EMENU Menu) |
| Frees resources used by a root menu and its children. | |
| VOID | PhInitializeEMenuData (_Out_ PPH_EMENU_DATA Data) |
| Initializes a data structure containing additional information resulting from a call to PhEMenuToHMenu(). | |
| VOID | PhDeleteEMenuData (_Inout_ PPH_EMENU_DATA Data) |
| Frees resources used by a data structure initialized by PhInitializeEMenuData(). | |
| HMENU | PhEMenuToHMenu (_In_ PPH_EMENU_ITEM Menu, _In_ ULONG Flags, _Inout_opt_ PPH_EMENU_DATA Data) |
| Converts an EMENU to a Windows menu object. | |
| VOID | PhEMenuToHMenu2 (_In_ HMENU MenuHandle, _In_ PPH_EMENU_ITEM Menu, _In_ ULONG Flags, _Inout_opt_ PPH_EMENU_DATA Data) |
| Converts an EMENU to a Windows menu object. | |
| VOID | PhHMenuToEMenuItem (_Inout_ PPH_EMENU_ITEM MenuItem, _In_ HMENU MenuHandle) |
| Converts a Windows menu object to an EMENU. | |
| PHLIBAPI VOID | PhLoadResourceEMenuItem (_Inout_ PPH_EMENU_ITEM MenuItem, _In_ HINSTANCE InstanceHandle, _In_ PWSTR Resource, _In_ ULONG SubMenuIndex) |
| Loads a menu resource and converts it to an EMENU. | |
| PHLIBAPI PPH_EMENU_ITEM | PhShowEMenu (_In_ PPH_EMENU Menu, _In_ HWND WindowHandle, _In_ ULONG Flags, _In_ ULONG Align, _In_ ULONG X, _In_ ULONG Y) |
| Displays a menu. | |
| PHLIBAPI BOOLEAN | PhSetFlagsEMenuItem (_Inout_ PPH_EMENU_ITEM Item, _In_ ULONG Id, _In_ ULONG Mask, _In_ ULONG Value) |
| Sets the flags of a menu item. | |
| FORCEINLINE BOOLEAN | PhEnableEMenuItem (_Inout_ PPH_EMENU_ITEM Item, _In_ ULONG Id, _In_ BOOLEAN Enable) |
| PHLIBAPI VOID | PhSetFlagsAllEMenuItems (_In_ PPH_EMENU_ITEM Item, _In_ ULONG Mask, _In_ ULONG Value) |
| Sets flags for all children of a menu item. | |
| PHLIBAPI VOID | PhModifyEMenuItem (_Inout_ PPH_EMENU_ITEM Item, _In_ ULONG ModifyFlags, _In_ ULONG OwnedFlags, _In_opt_ PWSTR Text, _In_opt_ HBITMAP Bitmap) |
| typedef struct _PH_EMENU_ITEM PH_EMENU |
| typedef struct _PH_EMENU_DATA PH_EMENU_DATA |
| typedef struct _PH_EMENU_ITEM PH_EMENU_ITEM |
| typedef struct _PH_EMENU_ITEM * PPH_EMENU |
| typedef struct _PH_EMENU_DATA * PPH_EMENU_DATA |
| typedef struct _PH_EMENU_ITEM * PPH_EMENU_ITEM |
| PHLIBAPI PPH_EMENU_ITEM PhCreateEMenuItem | ( | _In_ ULONG | Flags, |
| _In_ ULONG | Id, | ||
| _In_ PWSTR | Text, | ||
| _In_opt_ HBITMAP | Bitmap, | ||
| _In_opt_ PVOID | Context | ||
| ) |
Creates a menu item.
| Flags | A combination of the following:
|
| Id | A unique identifier for the menu item. |
| Text | The text displayed for the menu item. |
| Bitmap | A bitmap image for the menu item. |
| Context | A user-defined value. |
| VOID PhDeleteEMenuData | ( | _Inout_ PPH_EMENU_DATA | Data | ) |
Frees resources used by a data structure initialized by PhInitializeEMenuData().
| PHLIBAPI VOID PhDestroyEMenuItem | ( | _In_ PPH_EMENU_ITEM | Item | ) |
| HMENU PhEMenuToHMenu | ( | _In_ PPH_EMENU_ITEM | Menu, |
| _In_ ULONG | Flags, | ||
| _Inout_opt_ PPH_EMENU_DATA | Data | ||
| ) |
Converts an EMENU to a Windows menu object.
| Menu | The menu item to convert. |
| Flags | A combination of the following:
|
| Data | Additional data resulting from the conversion. The data structure must be initialized by PhInitializeEMenuData() prior to calling this function. |
| VOID PhEMenuToHMenu2 | ( | _In_ HMENU | MenuHandle, |
| _In_ PPH_EMENU_ITEM | Menu, | ||
| _In_ ULONG | Flags, | ||
| _Inout_opt_ PPH_EMENU_DATA | Data | ||
| ) |
Converts an EMENU to a Windows menu object.
| MenuHandle | A handle to a Windows menu object. |
| Menu | The menu item to convert. The items are appended to MenuHandle. |
| Flags | A combination of the following:
|
| Data | Additional data resulting from the conversion. The data structure must be initialized by PhInitializeEMenuData() prior to calling this function. |
| FORCEINLINE BOOLEAN PhEnableEMenuItem | ( | _Inout_ PPH_EMENU_ITEM | Item, |
| _In_ ULONG | Id, | ||
| _In_ BOOLEAN | Enable | ||
| ) |
| PHLIBAPI PPH_EMENU_ITEM PhFindEMenuItem | ( | _In_ PPH_EMENU_ITEM | Item, |
| _In_ ULONG | Flags, | ||
| _In_opt_ PWSTR | Text, | ||
| _In_opt_ ULONG | Id | ||
| ) |
Finds a child menu item.
| Item | The parent menu item. |
| Flags | A combination of the following:
|
| Text | The text of the menu item to find. If NULL, the text is ignored. |
| Id | The identifier of the menu item to find. If 0, the identifier is ignored. |
| PPH_EMENU_ITEM PhFindEMenuItemEx | ( | _In_ PPH_EMENU_ITEM | Item, |
| _In_ ULONG | Flags, | ||
| _In_opt_ PWSTR | Text, | ||
| _In_opt_ ULONG | Id, | ||
| _Out_opt_ PPH_EMENU_ITEM * | FoundParent, | ||
| _Out_opt_ PULONG | FoundIndex | ||
| ) |
Finds a child menu item.
| Item | The parent menu item. |
| Flags | A combination of the following:
|
| Text | The text of the menu item to find. If NULL, the text is ignored. |
| Id | The identifier of the menu item to find. If 0, the identifier is ignored. |
| FoundParent | A variable which receives the parent of the found menu item. |
| FoundIndex | A variable which receives the index of the found menu item. |
| VOID PhHMenuToEMenuItem | ( | _Inout_ PPH_EMENU_ITEM | MenuItem, |
| _In_ HMENU | MenuHandle | ||
| ) |
| PHLIBAPI ULONG PhIndexOfEMenuItem | ( | _In_ PPH_EMENU_ITEM | Parent, |
| _In_ PPH_EMENU_ITEM | Item | ||
| ) |
| VOID PhInitializeEMenuData | ( | _Out_ PPH_EMENU_DATA | Data | ) |
Initializes a data structure containing additional information resulting from a call to PhEMenuToHMenu().
| PHLIBAPI VOID PhInsertEMenuItem | ( | _Inout_ PPH_EMENU_ITEM | Parent, |
| _Inout_ PPH_EMENU_ITEM | Item, | ||
| _In_ ULONG | Index | ||
| ) |
| PHLIBAPI VOID PhLoadResourceEMenuItem | ( | _Inout_ PPH_EMENU_ITEM | MenuItem, |
| _In_ HINSTANCE | InstanceHandle, | ||
| _In_ PWSTR | Resource, | ||
| _In_ ULONG | SubMenuIndex | ||
| ) |
Loads a menu resource and converts it to an EMENU.
| MenuItem | The menu item in which the converted menu items will be placed. |
| InstanceHandle | The module containing the menu resource. |
| Resource | The resource identifier. |
| SubMenuIndex | The index of the sub menu to use, or -1 to use the root menu. |
| PHLIBAPI VOID PhModifyEMenuItem | ( | _Inout_ PPH_EMENU_ITEM | Item, |
| _In_ ULONG | ModifyFlags, | ||
| _In_ ULONG | OwnedFlags, | ||
| _In_opt_ PWSTR | Text, | ||
| _In_opt_ HBITMAP | Bitmap | ||
| ) |
| PHLIBAPI VOID PhRemoveAllEMenuItems | ( | _Inout_ PPH_EMENU_ITEM | Parent | ) |
| PHLIBAPI BOOLEAN PhRemoveEMenuItem | ( | _Inout_opt_ PPH_EMENU_ITEM | Parent, |
| _In_opt_ PPH_EMENU_ITEM | Item, | ||
| _In_opt_ ULONG | Index | ||
| ) |
Removes a menu item from its parent.
| Parent | The parent menu item. If Item is NULL, this parameter must be specified. |
| Item | The child menu item. This may be NULL if Index is specified. |
| Index | The index of the menu item to remove. If Item is specified, this parameter is ignored. |
| PHLIBAPI VOID PhSetFlagsAllEMenuItems | ( | _In_ PPH_EMENU_ITEM | Item, |
| _In_ ULONG | Mask, | ||
| _In_ ULONG | Value | ||
| ) |
| PHLIBAPI BOOLEAN PhSetFlagsEMenuItem | ( | _Inout_ PPH_EMENU_ITEM | Item, |
| _In_ ULONG | Id, | ||
| _In_ ULONG | Mask, | ||
| _In_ ULONG | Value | ||
| ) |
| PHLIBAPI PPH_EMENU_ITEM PhShowEMenu | ( | _In_ PPH_EMENU | Menu, |
| _In_ HWND | WindowHandle, | ||
| _In_ ULONG | Flags, | ||
| _In_ ULONG | Align, | ||
| _In_ ULONG | X, | ||
| _In_ ULONG | Y | ||
| ) |
Displays a menu.
| Menu | A menu. |
| WindowHandle | The window that owns the popup menu. |
| Flags | A combination of the following:
|
| Align | The alignment of the menu. |
| X | The horizontal location of the menu. |
| Y | The vertical location of the menu. |
| typedef VOID | ( | NTAPI * | PPH_EMENU_ITEM_DELETE_FUNCTION | ) |