ObjectARX2010二次开发之 --- DXF转G代码(1)

近期计划用ObjectARX2010开发一个DXF转G代码插件,计划已开始.在此记录每天编程用到的关键函数.今日用到的函数如下:

 

以下英文解释默认是参考ObjectARX for AutoCAD2010,部分参考MSDN.

 

1.acedGetAcadFrame()   (参考ObjectARX for AutoCAD2010)

Description:

This function is used toget the pointer to AutoCAD's main frame window. 

For building ObjectARXapplications with a static MFC library, or when not using the same shared MFCDLL as AutoCAD, a pointer to a window cannot be used. Instead, use the windowhandle. To get the window handle, use acedGetAcadFrame()->m_hWnd; 

 

2.GetMenuItemCount()   (参考MSDN,菜单部分有疑问可参考MSDN)

Description:

Determinesthe number of items in a pop-up or top-level menu.

Return Value:

The number ofitems in the menu if the function is successful; otherwise –1.

 

3.CreateMenu()   (参考MSDN)

Description:

Creates amenu and attaches it to the CMenu object.

Return Value:

Nonzero ifthe menu was created successfully; otherwise 0.

 

4.CreatePopupMenu()   (参考MSDN)

Description:

Creates apop-up menu and attaches it to the CMenuobject.

Return Value:

Nonzero ifthe pop-up menu was successfully created; otherwise 0.

 

5.AppendMenu()   (参考MSDN)

Description:

Appends a newitem to the end of a menu.

Return Value:

Nonzero ifthe function is successful; otherwise 0.

 

6.AppendMenu()   (参考MSDN)

Description:

Detaches aWindows menu from a CMenu object and returns the handle.

Return Value:

The handle,of type HMENU, to a Windows menu, if successful; otherwise NULL.

 

7.acedRegisterFilterWinMsg()   (参考ObjectARX for AutoCAD2010)

Description:

Register a filter messagehook into AutoCAD's Windows message loop. The message passed to yourapplication can be changed and can be blocked out.

Returns TRUE ifsuccessfully registers the hook. Otherwise, returns FALSE.

AcedFilterWinMsgFn istypedef BOOL (* AcedFilterWinMsgFn)(MSG*);

The function pointed toby pfn can change the value of MSG passed to it. If the function returns FALSE,the message will be passed to other hook functions and AutoCAD, provided thatthe other hooks don't block out the message.

If the function returnsTRUE, the message will not be passed to other hook functions or AutoCAD. Themessage is terminated.

 

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 8
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值