If AfxGetMainWnd is called from the application's primary thread, it returns the application's main window according to the above rules. If the function is called from a secondary thread in the application, the function returns the main window associated with the thread that made the call. 把主窗口的Hwnd记录下来传到线程里
把主窗口的Hwnd记录下来传到线程里
ASSERT(pMain);