How to get window handle from a CDialog derived class?
Asked Answered
V

1

5

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

Thanks

Vereen answered 23/10, 2009 at 15:27 Comment(0)
W
9
HWND hWnd = GetSafeHwnd();

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

Wrac answered 23/10, 2009 at 15:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.