ウィンドウ フレームのウィンドウ ハンドルを取得します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: はい
タイプ: Long_PTR
ウィンドウ フレームのハンドル。
追加の注意はありません。
VBA:
Sub Example_HWND()
' This example returns the handle (Hwnd) of a document window. The handle can be
' used with WindowsAPI calls, or with ActiveX components that require a handle
' to a window.
' If there are no open documents, then exit
If Documents.Count = 0 Then
MsgBox "There are no open documents!"
Exit Sub
End If
MsgBox "The HWND of the active document is: " & ActiveDocument.HWND
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_HWND()
;; This example returns the handle (Hwnd) of a document window. The handle can be
;; used with WindowsAPI calls, or with ActiveX components that require a handle
;; to a window.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(alert (strcat "The HWND of the active document is: " (itoa (vla-get-HWND doc))))
)