本帖最后由 作者 于 2006-5-30 21:20:21 编辑
[转载]获得AutoCAD应用程序窗口的句柄
Attribute VB_Name = "GetAcadHwnd" 'Purpose ' Returns the handle to the AutoCAD application window 'Notes ' Use this when you need a handle to AutoCAD's main window rather than a document window
Public Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Public Function GetAcadHwnd() As Long
GetAcadHwnd = GetParent(GetParent(ThisDrawing.hwnd))
End Function
哪位xd能帮解释一下ThisDrawing具体是个什么,是个autocad文件还是其它什么。   |