SetItemTextfunction
Sets the text of the specified menu item.
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.
Syntax
FUNCTION SetItemText (BYVAL hMenu AS HMENU, BYVAL uItem AS DWORD, BYREF wszText AS WSTRING, BYVAL fByPosition AS LONG = FALSE) AS BOOLEAN
Parameters
| Name | Description | |
|---|---|---|
hMenu | A handle to the menu that contains the menu item. | |
uItem | The identifier or position of the menu item to get information about. The meaning of this parameter depends on the value of fByPosition. | |
wszText | Text to set. | |
fByPosition | The meaning of uItem. If this parameter is FALSE, uItem is a menu item identifier. Otherwise, it is a menu item position. |
Return value
TRUE or FALSE. To get extended error information, use the GetLastError function.
Description
Sets the text of the specified menu item.
Remarks
The application must call the CMenu.DrawBar method whenever a menu changes, whether or not the menu is in a displayed window. SetItemText does this call internally.
Example
DIM bRes AS BOOLEAN = CMenu.SetItemText(hMenu, IDM_NEW, "New file")
Reference
- Documented in Windows/WIndows Controls/CMenu Class.md
- Topic: About Menus