如何把vb编写的程序改为vc的形式??
如何将vb的代码改写成vc的?二者主要在哪些方面会有不同?比如: vb: Dim currMenuGroup As AcadMenuGroup 这样定义变量
而对 vc,若用 AcadMenuGroup currMenuGroup; 形式定义上例变量,两者是否等价?
但是我在没使用头文件的前提下编译,总报错为:AcadMenuGroup没有定义
vc编写的程序中需包含的头文件如何查找到?
////////////Creating a new popup menu//////////////////////////////////////////////
This example creates a new popup menu called "TestMenu" in the first menu group of the MenuGroups collection.
Sub Ch6_CreateMenu()
Dim currMenuGroup As AcadMenuGroup
Set currMenuGroup = ThisDrawing.Application.MenuGroups.Item(0)
' Create the new menu
Dim newMenu As AcadPopupMenu
Set newMenu = currMenuGroup.Menus.Add("TestMenu")
End Sub
页:
[1]