TrackPopupMenuEx function user32

Win32Result<bool> TrackPopupMenuEx(
  1. HMENU hMenu,
  2. int uFlags,
  3. int x,
  4. int y,
  5. HWND hwnd,
  6. Pointer<TPMPARAMS>? lptpm,
)

Displays a shortcut menu at the specified location and tracks the selection of items on the shortcut menu.

The shortcut menu can appear anywhere on the screen.

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

Implementation

Win32Result<bool> TrackPopupMenuEx(
  HMENU hMenu,
  int uFlags,
  int x,
  int y,
  HWND hwnd,
  Pointer<TPMPARAMS>? lptpm,
) {
  final result_ = TrackPopupMenuEx_Wrapper(
    hMenu,
    uFlags,
    x,
    y,
    hwnd,
    lptpm ?? nullptr,
  );
  return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}