|
int SetMenuBarAttribute (int menuBarHandle, int menuOrMenuItemID,
int menuBarAttribute, ...);
int SetCtrlMenuAttribute (int panelHandle, int controlID, int menuItemID,
int ctrlMenuAttribute, ...);
在程序的主面板上有菜单项。在菜单项的回调函数中我用 SetMenuBarAttribute来修改菜单的属性都是可以的。但现在我需要在别的控件的回调函数中也能修改菜单的属性,我也使用SetMenuBarAttribute,但调试时通知我找不到菜单的ID。我换用SetCtrlMenuAttribute时同样出错,出错信息如下:
NON-FATAL RUN-TIME ERROR
Library function erroe.Controls of the type passed do not have a menu.
不知道这是什么原因?是参数不对吗?为什么提示说找不到菜单呢? 另外这俩个函数在使用上有那些区别呢?我也看过他们的help,只能看出来其功能基本一致。请各位帮我分析一下,在使用这两个函数时都应该注意那些问题。 |
|