CWnd* h_q = AfxGetApp()->GetMainWnd(); //获取主窗口的句柄 转载于:https://www.cnblogs.com/2018shawn/p/9403529.html