Help Center

RightJustifyItemfunction

Right justifies a top level menu item. This is usually used to have the Help menu item right-justified on the menu bar.

Windowsfunctiondoc-orphan
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 RightJustifyItem (BYVAL hMenu AS HMENU, BYVAL item AS LONG, BYVAL fByPosition AS BOOLEAN = FALSE) AS BOOLEAN

Parameters

NameDescription
hWinHandle of the window or dialog that owns the menu.
itemThe identifier or position of the menu item to get information about. The meaning of this parameter depends on the value of fByPosition.
fByPositionThe meaning of item. If this parameter is FALSE, item is a menu item identifier. Otherwise, it is a menu item position, where position = 1 for the first position, position = 2 for the second, and so on.

Return value

TRUE or FALSE. To get extended error information, use the GetLastError function.

Description

Right justifies a top level menu item. This is usually used to have the Help menu item right-justified on the menu bar.

Remarks

The application must call the CMenu.DrawBar method whenever a menu changes, whether or not the menu is in a displayed window. RightJustifyItem does this call internally.

Example

DIM bRes AS BOOLEAN = CMenu.RightJustifyItem(hMenu, ID_EXIT)

Reference

  • Documented in Windows/WIndows Controls/CMenu Class.md
  • Topic: About Menus