본문 바로가기
코드

FindWindow

by umaking 2010. 7. 13.
 

HWND hWnd = NULL;
HWND phWnd = NULL;
HDC hDC = NULL;
char word[0xff];
AnsiString tmp = "--TRAY";
AnsiString titl = "";

hWnd = FindWindow("#32770", NULL);
if(hWnd)
{
	GetWindowText(hWnd, word, 0xfe);
	titl = AnsiString(word);
	phWnd = GetParent(hWnd);
	GetWindowText(phWnd, word, 0xfe);
	if(memcmp(word, tmp.c_str(),  tmp.Length()) != 0)
	return;

	hWnd = FindWindowEx(hWnd, 0, NULL, "확인");
	if(hWnd)
	{
		SendMessage(hWnd, WM_LBUTTONDOWN, 0, 0);
		SendMessage(hWnd, WM_LBUTTONUP, 0, 0);
		Memo1->Lines->Add("닫음 - " + titl);
	}
}

'코드' 카테고리의 다른 글

Cam  (0) 2010.08.10
unzip  (2) 2010.08.03
SQLPLUS에서 SQL DDL Export  (0) 2009.11.11
GNUstep Make파일을 만들다.  (0) 2009.10.22
AWK - 디스크 용량 분석  (0) 2009.10.13