질문이 있습니다. 목록의 모든 창에 캡션을 넣기 만하면됩니다. 캡션으로 "메모장", "총 사령관"- 단순히 창 상단에 표시된 텍스트를 의미합니다.현재 실행중인 실제 캡션을 얻는 방법은 무엇입니까?
지금까지 내가 여기
function EnumWindowProc(hHwnd: HWND; lParam : integer): boolean; stdcall;
var
pPid : DWORD;
title, ClassName : string;
begin
if (hHwnd=NULL) then
begin
result := false;
end
else
begin
GetWindowThreadProcessId(hHwnd,pPid);
SetLength(ClassName, 255);
SetLength(ClassName,
GetClassName(hHwnd,
PChar(className),
Length(className)));
SetLength(title, 255);
SetLength(title, GetWindowText(hHwnd, PChar(title), Length(title)));
OptionsForm.ListBox1.Items.Add(title);
OptionsForm.Memo1.Lines.Add
('Class Name = ' + className +
'; Title = ' + title +
'; HWND = ' + IntToStr(hHwnd) +
'; Pid = ' + IntToStr(pPid));
Result := true;
end;
end;
왔 그러나 잘, 그것은 "창"의 모든 종류 등 난 단지 "메인"사람을 얻을 수있는 방법 형태의 서로 다른 초점을 맞추고을 반환?
Class Name = Shell_TrayWnd; Title = ; HWND = 65898; Pid = 3776
Class Name = CiceroUIWndFrame; Title = CiceroUIWndFrame; HWND = 65976; Pid = 3776
Class Name = THelpInsightWindowImpl; Title = HelpInsightWindow; HWND = 1577734; Pid = 4852
Class Name = THelpInsightWindowImpl; Title = HelpInsightWindow; HWND = 591660; Pid = 4852
Class Name = TTokenWindow; Title = CodeParamWindow; HWND = 985436; Pid = 4852
Class Name = TaskSwitcherWnd; Title = Přepínání úloh; HWND = 66824; Pid = 3776
Class Name = tooltips_class32; Title = ; HWND = 198982; Pid = 1768
Class Name = tooltips_class32; Title = ; HWND = 66046; Pid = 3776
Class Name = _SearchEditBoxFakeWindow; Title = ; HWND = 66024; Pid = 3776
Class Name = tooltips_class32; Title = ; HWND = 66008; Pid = 3776
Class Name = tooltips_class32; Title = ; HWND = 131538; Pid = 3776
Class Name = Desktop User Picture; Title = Magicmaster; HWND = 65982; Pid = 3776
Class Name = DV2ControlHost; Title = Nabídka Start; HWND = 65978; Pid = 3776
Class Name = tooltips_class32; Title = ; HWND = 327840; Pid = 1768
Class Name = tooltips_class32; Title = ; HWND = 460808; Pid = 1768
Class Name = CTSCTooltip; Title = ; HWND = 266710; Pid = 2792
Class Name = Auto-Suggest Dropdown; Title = ; HWND = 69884; Pid = 4732
Class Name = Auto-Suggest Dropdown; Title = ; HWND = 69802; Pid = 4732
Class Name = TaskbarNotifierClass; Title = DAP Message Center; HWND = 68924; Pid = 4732
Class Name = tooltips_class32; Title = ; HWND = 134356; Pid = 1992
Class Name = ATKOSD; Title = ATKOSD; HWND = 65884; Pid = 3636
사전에 감사 : 여기
결과의 샘플입니다!
음, 무슨 "주"방법을 결정하여 시작합니다. –
롭이 맞아. 너는 무엇을 찾고 있느냐. 나는 당신이 작업 표시 줄에 버튼이있는 창만 원한다고 생각합니다. –
[MSDN] (http://msdn.microsoft.com/en-us/library/cc144179(VS.85) .aspx # Managing_Taskbar_But) : 응용 프로그램에서 창을 생성 할 때마다 셸에서 작업 표시 줄에 단추를 만듭니다 소유하지 않았다. 창 단추를 작업 표시 줄에 배치하려면 WS_EX_APPWINDOW 확장 스타일이있는 소유되지 않은 창을 만드십시오. –