GetMenuItemCount 函式 (winuser.h)

決定指定功能表中的項目數。

語法

int GetMenuItemCount(
  [in, optional] HMENU hMenu
);

參數

[in, optional] hMenu

類型: HMENU

要檢查之功能表的句柄。

傳回值

類型: int

如果函式成功,傳回值會指定功能表中的項目數。

如果函式失敗,則傳回值為 -1。 若要取得擴充的錯誤資訊,請呼叫 GetLastError

規格需求

需求
最低支援的用戶端 Windows 2000 專業版 [僅限傳統型應用程式]
最低支援的伺服器 Windows 2000 Server [僅限傳統型應用程式]
目標平台 Windows
標頭 winuser.h (包括 Windows.h)
程式庫 User32.lib
Dll User32.dll
API 集合 ext-ms-win-ntuser-menu-l1-1-0 (於 Windows 8)

另請參閱

概念

GetMenuItemID

功能表

參考