VXPLib Documentation: COM
|
IVXPMenuHook::Override
-
Call this method to make a menu item ownerdrawn (drawn through the event system of interface IVXPMenuHook)
-
HRESULT Override(long uItem, VARIANT_BOOL bByPos, long ItemID, long Sub1, long Sub2, long Sub3, long Sub4, long Sub5, long Sub6, long Sub7, long Sub8, long Sub9, VARIANT_BOOL * success);
|
Parameters
-
uItem [in] - Command ID of the item, if bByPos is FALSE, or menu item position otherwise. If it specifies a CommandID,
and parameter ItemID is skipped or equals 0 uItem also becomes ItemID of the menu item (see Remarks).
bByPos [in, defaultvalue(FALSE)] - Specifies how parameter uItem must be treated: TRUE - by position in the menu, FALSE - by CommandID
ItemID [in] - ID to be associated with the menu item (see Remarks).
SubN [in] - Index of submenu of level N in the menu.
Remarks
-
This method overrides a menu item to be drawn using interface IVXPMenuHook
When processing all menu messages interface IVXPMenuHook uses ItemID instead of CommandID.
The interface stores ItemID in the extra reserved for this Data field in each menu item.
Therefore, field Data for such menu items cannot be used for anything else.
ID for the menu item is set with the value passed through parameter ItemID. If this parameter is not specified or equals 0
ItemID will be set equal CommandID of the item.
Note: If it is a pop-up menu item such item doesn't have any CommandID, and specifying ID for the item using
parameter ItemID is necessary. Otherwise, it will be impossible to process notificastion messages from the interface to measure
and draw the item.
See Also
-
IVXPMenuHook | OverrideMenu | OverrideSys
|