AIT_VerifyMenuEnabled

Description

Checks whether the menu item is enabled.

Format

integer AIT_VerifyMenuEnabled  (
 integer nMenu,      // Menu handle
 integer nIndex      // Index for a menu item
);

Parameters

nMenu (input)

Specify a menu handle returned by the AIT_GetMenu or AIT_GetSubMenu API function.

nIndex (input)

Specify the index of a menu item. As the menu index is based on 0, the index for the first menu item is 0.

The indexes also include a menu separator index. If a menu separator index has been given as an input value, this function is not processed successfully, with ERROR_INVALID_INDEX returned as the extended error code.

Return values

The return value is 1 if the menu item is enabled, 0 if not, and -1 if the function has not been processed successfully.

If -1 has been returned, you can use AIT_GetLastError to acquire an extended error code. The following gives the error codes that AIT_GetLastError might return:

Extended error numberError code
8ERROR_NOT_ENOUGH_MEMORY
14ERROR_OUTOFMEMORY
87ERROR_INVALID_PARAMETER
112ERROR_DISK_FULL
1401ERROR_INVALID_MENU_HANDLE
1413ERROR_INVALID_INDEX
1460ERROR_TIMEOUT