HWND hWnd = NULL; UINT func1(LPVOID pParam) //线程函数 { BOOL bb; for (int i = 0; i < 1000; i++) { bb = IsIconic(hWnd);//判断窗口是否最小化 /* 参数1:HWND hWnd 窗口句柄 返回值:已经最小化返回TRUE, 非最小化返回FALSE */ CString str; str.Format(_T("bb=%d"), bb); ::OutputDebugString(str); Sleep(1000); } return 0; } void CssDlg::OnBnClickedButton1() { hWnd = GetSafeHwnd(); CWinThread* pp = AfxBeginThread(func1, LPVOID(456), 0, 0, 0, NULL); }
标签:MFC,窗口,bb,hWnd,str,最小化,IsIconic From: https://www.cnblogs.com/liming19680104/p/17310560.html