Share via


CWinFormsDialog::GetControlHandle

Retrieves a window handle to the Windows Forms user control.

inline HWND GetControlHandle( ) const throw( );

Description

This method is provided as a convenient way to obtain a window handle (HWND) for a UserControl control, rather than performing a series of casts on a managed object, such as:

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

Return Value

Returns a window handle to the Windows Forms user control.

Requirements

Header: afxwinforms.h

See Also

Reference

CWinFormsDialog Class

CWinFormsDialog::GetControl

System.Windows.Forms.UserControl