CWnd* h_q = AfxGetApp()->GetMainWnd(); //获取主窗口的句柄 转载于:https://my.oschina.net/Thekillersohot/blog/699595