次の方法で共有


CWinFormsDialog::GetControlHandle

Windows フォーム ユーザー コントロールへのウィンドウ ハンドルを取得します。

inline HWND GetControlHandle( ) const throw( );

説明

このメソッドは、マネージ オブジェクトで一連のキャストを実行するのではなく、UserControl コントロールのウィンドウ ハンドル (HWND) を取得する際に便利な手段として用意されています。

HWND hwnd = reinterpret_cast<HWND>(static_cast<INT_PTR>(GetControl()->Handle));

戻り値

Windows フォーム ユーザー コントロールへのウィンドウ ハンドルを返します。

必要条件

**ヘッダー:**afxwinforms.h

参照

参照

CWinFormsDialog クラス

CWinFormsDialog::GetControl

System.Windows.Forms.UserControl

その他の技術情報

CWinFormsDialog メンバー