Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法从 CDialog 派生类(如 CWnd::m_hWnd 成员)中检索窗口句柄?
谢谢
HWND hWnd = GetSafeHwnd();
应该可以解决问题,但是 CDialog 本身是从 CWnd 派生的,因此 m_hWnd 也可以在 CDialog 内部访问