HANDLE handle = NULL; HANDLE handle1 = NULL; pwin = AfxGetApp(); handle=AfxGetApp()->m_pMainWnd;//获得主线程的句柄 CString str; str.Format(_T("主线程句柄=%d\r\n"), handle); ::OutputDebugString(str); handle1 = AfxGetMainWnd();//获得当前线程句柄 str.Format(_T("当前线程句柄=%d\r\n"), handle1); ::OutputDebugString(str);
- 句柄 MFC-AfxGetMainWnd 线程 AfxGetMainWnd MFC句柄mfc-afxgetmainwnd线程afxgetmainwnd mfc-afxgetmainwnd 句柄mfc-iswindow标识iswindow 句柄mfc-getmodulehandle getmodulehandle模块 句柄mfc-getnextwindow getnextwindow mfc 句柄 顶层mfc-gettopwindow gettopwindow 句柄mfc-getcurrentprocess getcurrentprocess 句柄 线程 数目 问题 线程mfc mfc-createprocess线程createprocess进程