How to get a window handle from a CDialog derived class?

Is there a way to get a window handle from a derived CDialog class (e.g. CWnd :: m_hWnd member)?

thanks

+4
source share
1 answer
HWND hWnd = GetSafeHwnd(); 

Should do the trick, but CDialog itself is obtained from CWnd, so m_hWnd will be available inside CDialog too

+7
source

All Articles