#include “BiAnno.h”
BOOL CALLBACK AnnoAddCustomMenuItem ( LPVOID pMenu, LPCTSTR pMenuName, BOOL bEnabled, BOOL bChecked, DWORD dwReturnValue )
Description
This function appends a menu item to the user defiend pop-up menu.
Parameters
|
LPVOID |
pMenu |
Pointer to the custom menu |
|
LPCTSTR |
pMenuName |
Name of the menu item. The maximum length is 64 characters. |
|
BOOL |
bEnabled |
If this parameter is TRUE, the menu item will be enabled, otherwise the user cannot select this menu item. |
|
BOOL |
bChecked |
If this parameter is TRUE, the menu item will be checked. |
|
DWORD |
dwReturnValue |
This parameter must be greater than zero. This value identifies the menu item. |
Additional Information
This example shows how to use the dll when loading statically including the header file. Otherwise if the dll is loaded dynamically, for further information read the “About the difference of static and dynamic library loading” section of the manual.
Return value
TRUE on success, otherwise FALSE. If any error occurs, you can call the AnnoGetLastError function for the last error code.
Programming Notes
If you create a custom pop-up menu, this menu will be dispayed when you click the right mouse button. You can change the default pop-up menu in the annotation. If the pMenuName is a “-” character (without quotes) a separator will be appended to the menu. When the user selects a menu item, a window message will be sent to the application. This message informs the user about the type of the selected annotation object and the selected menu item. For example, if you add a menu item to the menu with name “First Menu” and dwReturnValue 1. If the user clicks on the “First Menu” in the pop-up menu, the selected menu item information will be 1 in the message sent. If the return value in the message is 0, the user didn’t select a menu item from the menu.
Code Example
None