13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GetMenuStateParametersReturn valueparameter identifies a menu with an associated pop-up menu. If hMenuidentifies a pop-up menu, this function obtains the status of the menuitem associated with wId.hMenuwIdwFlagsHMENU Identifies the menu.WORD Specifies the menu-item ID.WORD Specifies the nature of the wId parameter. If thewFlags parameter contains MF _BY POSITION, wId specifies a(zero-based) relative position; if wFlags containsMF _BYCOMMAND, wId specifies the item ID.The return value specifies the outcome of the function. It is -1 if thespecified item does not exist. If the menu itself does not exist, a fatal exitoccurs. If wId identifies a pop-up menu, the return value contains thenumber of items in the pop-up menu in its high-order byte, and the menuflags associated with the pop-up menu in its low-order byte; otherwise, itis a mask (Boolean OR) of the values from the following list (this maskdescribes the status of the menu item that wId identifies):ValueMF_CHECKEDMF _DISABLEDMF_ENABLEDMF_GRAYEDMF _MENUBARBREAKMF _MENUBREAKMF _SEPARATORMF_UNCHECKEDMeaningCheckmark is placed next to item (pop-up menus only).Item is disabled.Item is enabled.Item is disabled and grayed.Same as MF _MENUBREAK, except for pop-up menuswhere the new column is separated from the oldcolumn by a vertical dividing line.Item is placed on a new line (static menus) or in a newcolumn (pop-up menus) without separating columns.Horizontal dividing line is drawn (pop-up menusonly). This line cannot be enabled, checked, grayed, orhighlighted. The lpNewItem and wIDNewItemparameters are ignored.Checkmark is not placed next to item (default).GetMenuStringSyntaxint GetMenuString(hMenu, wIDItem,lpString, nMaxCount, wFlag)function GetMenuString(Menu: HMenu; IDItem: Word; Str: PChar;MaxCount: Integer; Flag: Word): Integer;This function copies the label of the specified menu item into the IpStringparameter.Parameters hMenu HMENU Identifies the menu.Chapter 4, Functions directory 323

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!