/** * Creates a menu item. * * \param Flags A combination of the following: * \li \c PH_EMENU_DISABLED The menu item is greyed and cannot be selected. * \li \c PH_EMENU_CHECKED A check mark is displayed. * \li \c PH_EMENU_HIGHLIGHT The menu item is highlighted. * \li \c PH_EMENU_MENUBARBREAK Places the menu item in a new column, separated * by a vertical line. * \li \c PH_EMENU_MENUBREAK Places the menu item in a new column, with no * vertical line. * \li \c PH_EMENU_DEFAULT The menu item is displayed as the default item. This * causes the text to be bolded. * \li \c PH_EMENU_RADIOCHECK Uses a radio-button mark instead of a check mark. * \param Id A unique identifier for the menu item. * \param Text The text displayed for the menu item. * \param Bitmap Reserved. * \param Context A user-defined value. */ PPH_EMENU_ITEM PhCreateEMenuItem( __in ULONG Flags, __in ULONG Id, __in PWSTR Text, __in_opt PWSTR Bitmap, __in_opt PVOID Context ) { PPH_EMENU_ITEM item; item = PhAllocateEMenuItem(); item->Flags = Flags; item->Id = Id; item->Text = Text; if (Bitmap) { // TODO } item->Context = Context; return item; }
/** * Creates a menu item. * * \param Flags A combination of the following: * \li \c PH_EMENU_DISABLED The menu item is greyed and cannot be selected. * \li \c PH_EMENU_CHECKED A check mark is displayed. * \li \c PH_EMENU_HIGHLIGHT The menu item is highlighted. * \li \c PH_EMENU_MENUBARBREAK Places the menu item in a new column, separated by a vertical line. * \li \c PH_EMENU_MENUBREAK Places the menu item in a new column, with no vertical line. * \li \c PH_EMENU_DEFAULT The menu item is displayed as the default item. This causes the text to * be bolded. * \li \c PH_EMENU_RADIOCHECK Uses a radio-button mark instead of a check mark. * \param Id A unique identifier for the menu item. * \param Text The text displayed for the menu item. * \param Bitmap A bitmap image for the menu item. * \param Context A user-defined value. */ PPH_EMENU_ITEM PhCreateEMenuItem( _In_ ULONG Flags, _In_ ULONG Id, _In_ PWSTR Text, _In_opt_ HBITMAP Bitmap, _In_opt_ PVOID Context ) { PPH_EMENU_ITEM item; item = PhAllocateEMenuItem(); item->Flags = Flags; item->Id = Id; item->Text = Text; item->Bitmap = Bitmap; item->Context = Context; return item; }