下载了一个POPmenu的UCD,居然用不起来,请看一下以下代码!(请先调用我上传的BUDMENU。U32)
相关文件:
点这儿打开-----------------------------------------------------------------------------
SelectMenu := mCreatePopupMenu()
ok := mAppendMenu( SelectMenu , MF_CHECKED , 100 , "Introduction" )
ok := mAppendMenu( SelectMenu , MF_SEPARATOR , 0 , "" )
------------------------------------------------------------------------------
按照其HLP文件应该是这样,但其中的MF_CHECKED 和MF_SEPARATOR 居然被AW认未是变量!要求输入初始值,这显然是我做的不正确。
以下是HLP文件中的内容:
------------------------
Adding menu items
The function mAppendMenu adds menu items to the menu. For example:
ok := mAppendMenu( Menu, Flags , MenuID , MenuText )
Menu is the handle of the menu to add to.
Flags provides information about the menu item. Possible values include:
MF_CHECKED Places a check mark next to the item
MF_DISABLED Disables the item
MF_GRAYED Disables and grays the item
MF_POPUP Creates a sub-menu
MF_SEPARATOR Creates a separator bar
MenuID is a number to identify the menu. Each menu item must have a unique number.
MenuText is the text to appear in the menu.
The function returns false if it fails.
Examples:
ok := mAppendMenu( SelectMenu , MF_CHECKED , 100 , "Introduction" )
ok := mAppendMenu( SelectMenu , MF_SEPARATOR , 0 , "" )
subMenu := mCreatePopupMenu() -- create a submenu
ok := mAppenMenu( SubMenu , 0 , 200 , "Module 1" ) -- add item to submenu
ok := mAppendMenu( SelectMenu , MF_POPUP , SubMenu , "Module number") -- attach submenu
See the Windows API functions AppendMenu and InsertMenu functions for more details.
---------------------------------
其是的 Flags 参数该怎么填?按说明直接填“MF_CHECKED”,被解释为新变量。那怎么办?是不是与WINDOWS的API函数的参数有关??