방법1.
HWND hDlg=::GetForegroundWindow(); //활성화 된 프로그램 핸들
if(hDlg==m_hWnd)
AfxMessageBox("active");
방법2.
//MyProject 라는 프로그램이 활성화되어 있는가...
HWND hDlg=::GetForegroundWindow();
HWND hWnd=::FindWindow(NULL,"MyProject"); //특정 프로그램 핸들
if(hDlg==hWnd)
AfxMessageBox("active");
'MFC 인터페이스' 카테고리의 다른 글
스크린샷 찍기 (0) | 2013.10.20 |
---|---|
CString 관련 함수 (0) | 2013.10.20 |
리스트 컨트롤 배경 지정 하기 (0) | 2013.10.20 |
윈도우 특별한 경로 폴더 얻기 (0) | 2013.10.20 |
파일 사이즈 알아내기 (0) | 2013.10.20 |