GetMenuString function user32

int GetMenuString(
  1. HMENU hMenu,
  2. int uIDItem,
  3. PWSTR? lpString,
  4. int cchMax,
  5. MENU_ITEM_FLAGS flags,
)

Copies the text string of the specified menu item into the specified buffer.

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getmenustringw.

Implementation

@pragma('vm:prefer-inline')
int GetMenuString(
  HMENU hMenu,
  int uIDItem,
  PWSTR? lpString,
  int cchMax,
  MENU_ITEM_FLAGS flags,
) => _GetMenuString(hMenu, uIDItem, lpString ?? nullptr, cchMax, flags);