Question

Is there a way to retrieve window handle from a CDialog derived class (like CWnd::m_hWnd member) ?

Thanks

Was it helpful?

Solution

HWND hWnd = GetSafeHwnd();

Should do the trick, but CDialog is itself derived from CWnd so m_hWnd would be accessable inside CDialog too

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top