- UID
- 1
- 积分
- 15892
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-3
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
问题:
I am trying to get an interface pointer to the AutoCAD Application, using the
GetObject() from a VB client application. But if a command or Modal dialog
(e.g. layer dialog) is active, then AutoCAD is not able to process the ActiveX
Automation request and GetObject() fails. How can I cancel any modal dialog
that s active in AutoCAD?
解答:
You can make use of Win32 API calls to enumerate the windows and then check
for the parent and window style of the window. If the parent of a window is
"AutoCAD", then we know that it is a dialog related to AutoCAD. Next, check
to see if the window style is of type WS_POPUPWINDOW and WS_VISIBLE. If it
is, then we know this is a modal dialog active in AutoCAD. The attached VB
sample shows how to implement the above. Please refer to the Microsoft s MSDN
library (www.microsoft.com) for complete details on the Win32 API calls that
are used in this project.
|
|