새 프로젝트를 만들고 Form1에 하나의 버튼과 메모를 정리하고 Button1의 Onclick 이벤트에 다음 코드를 작성하십시오.
절차 tform1.Button1click (sender : tobject);
var
hcurrentwindow : hwnd;
sztext : char의 배열 [0..254];
시작하다
hcurrentwindow : = getwindow (핸들, gw_hwndfirst);
hcurrentwindow <> 0
시작하다
getWindowText (hcurrentWindow, @sztext, 255)> 0이면
memo1.lines.add (strpas (@sztext));
hcurrentwindow : = getwindow (hcurrentwindow, gw_hwndnext);
끝;
끝;