Форум: "WinAPI";
Текущий архив: 2004.05.23;
Скачать: [xml.tar.bz2];
Внизсписок заголовков окон Найти похожие ветки
← →
lehich © (2004-04-07 11:07) [0]имеем: открыто несколько виндовых окон
нужно: получить заголовки всех открытых окон
каким образом это осуществить???
Заранее премного благодарен...
← →
Игорь Шевченко © (2004-04-07 12:26) [1]EnumWindows + GetWindowText ?
← →
lehich © (2004-04-07 16:02) [2]если не сложно можно поподробнее... plz....
← →
Polevi © (2004-04-07 16:38) [3]program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils, Windows;
function EnumWindowsProc(hwnd:THandle; lParam:Cardinal):boolean;stdcall
var
Buf:array[0..1024] of char;
begin
GetWindowText(hwnd,Buf,1024);
CharToOEMBuff(Buf,Buf,Length(Buf));
if Buf<>"" then
Writeln(Buf);
Result:=true;
end;
begin
EnumWindows(@EnumWindowsProc,0);
Readln;
end.
← →
lehich © (2004-04-07 17:32) [4]I/O error 105... ошибка на строке:
Writeln(Buf);
← →
lehich © (2004-04-07 17:36) [5]хы... откуда-то взялось теперь значение "Program Manager" хотя таких окон и нет впомине...
← →
Diamond Cat © (2004-04-07 23:39) [6]
> хы... откуда-то взялось теперь значение "Program Manager"
> хотя таких окон и нет впомине
интересно как вы без него обходитесь?
1)Вам нужно найти названия всех видимых окон? Тогда еще следует ввести проверку на их видимость iswindowvisible
2)Дочерние окна вас тоже интересуют? GetWindow(hwnd, gw_Owner)
3)Окна без заголовков вам нужны
Короче куча вопросов, по вашему вопросу :о)
← →
lehich © (2004-04-08 09:50) [7]нужны только окна, которые видны в панели задач...
← →
Игорь Шевченко © (2004-04-08 10:20) [8]
> нужны только окна, которые видны в панели задач...
http://www.schevchenko.net.ru/SRC/EnumFunctions_60.zip
← →
lehich © (2004-04-09 08:41) [9]Игорь Шевченко респект..)))) как раз то, что нужно...))))) и просто ради проформы спрошу... почему внизу в окне ошибко столько надписей выводится???
цитирую:
Build
[Warning] HSWinUtils.pas(175): Unsafe type "Pointer"
[Warning] HSWinUtils.pas(179): Unsafe type "Pointer"
[Warning] HSWinUtils.pas(181): Unsafe type "LPWSTR"
[Warning] HSWinUtils.pas(181): Unsafe type "LPWSTR"
[Warning] HSWinUtils.pas(205): Unsafe code "@ operator"
[Warning] HSWinUtils.pas(208): Unsafe code "@ operator"
[Warning] HSWinUtils.pas(217): Unsafe type "LPWSTR"
[Warning] HSWinUtils.pas(218): Unsafe type "LPWSTR"
[Warning] HSWinUtils.pas(220): Unsafe code "@ operator"
[Warning] HSWinUtils.pas(222): Unsafe code "@ operator"
[Warning] HSWinUtils.pas(225): Unsafe code "@ operator"
[Warning] HSWinUtils.pas(227): Unsafe type "lpServer: PWideChar"
[Warning] HSWinUtils.pas(227): Unsafe type "lpNameBuffer: PWideChar"
[Warning] HSWinUtils.pas(232): Unsafe type "Pointer"
[Warning] HSWinUtils.pas(234): Unsafe code "@ operator"
[Warning] HSWinUtils.pas(236): Unsafe code "@ operator"
[Warning] HSWinUtils.pas(239): Unsafe code "@ operator"
[Warning] HSWinUtils.pas(241): Unsafe type "Buffer: Pointer"
[Warning] HSWinUtils.pas(248): Unsafe type "PWideChar"
[Warning] HSWinUtils.pas(254): Unsafe type "JoinName: PWideChar"
[Warning] HSWinUtils.pas(255): Unsafe type "JoinName: PWideChar"
[Warning] HSWinUtils.pas(256): Unsafe type "JoinName: PWideChar"
[Warning] main.pas(101): Unsafe type "PWideChar"
[Warning] main.pas(107): Unsafe type "Pointer"
[Warning] main.pas(113): Unsafe type "Ptr32"
[Warning] main.pas(122): Unsafe type "Ptr32"
[Warning] main.pas(124): Unsafe type "Ptr32"
[Warning] main.pas(125): Unsafe type "Ptr32"
[Warning] main.pas(126): Unsafe type "Ptr32"
[Warning] main.pas(131): Unsafe type "Ptr32"
[Warning] main.pas(156): Unsafe type "Ptr32"
[Warning] main.pas(157): Unsafe type "Ptr32"
[Warning] main.pas(158): Unsafe type "Ptr32"
[Warning] main.pas(160): Unsafe type "Ptr32"
[Warning] main.pas(161): Unsafe type "Ptr32"
[Warning] main.pas(174): Unsafe type "Ptr32"
[Warning] main.pas(187): Unsafe code "@ operator"
[Warning] main.pas(192): Symbol "RaiseLastWin32Error" is deprecated
[Warning] main.pas(198): Unsafe code "@ operator"
[Warning] main.pas(199): Unsafe code "@ operator"
[Warning] main.pas(199): Unsafe type "ATargetProcessParametersPointer: Pointer"
[Warning] main.pas(199): Unsafe type "Ptr32"
[Warning] main.pas(201): Symbol "RaiseLastWin32Error" is deprecated
[Warning] main.pas(203): Unsafe type "Pointer"
[Warning] main.pas(206): Unsafe type "Ptr32"
[Warning] main.pas(208): Unsafe type "ATargetProcessParametersPointer: Pointer"
[Warning] main.pas(209): Unsafe code "@ operator"
[Warning] main.pas(212): Symbol "RaiseLastWin32Error" is deprecated
[Warning] main.pas(224): Unsafe type "Buffer: PWideChar"
[Warning] main.pas(225): Unsafe code "@ operator"
[Warning] main.pas(228): Symbol "RaiseLastWin32Error" is deprecated
[Warning] main.pas(245): Unsafe type "Pointer"
[Warning] main.pas(251): Unsafe type "Pointer"
[Warning] main.pas(254): Unsafe code "@ operator"
[Warning] main.pas(255): Unsafe code "@ operator"
[Warning] main.pas(258): Unsafe type "EnumProc: Pointer"
[Warning] main.pas(277): Unsafe type "Pointer"
[Warning] main.pas(283): Unsafe type "Pointer"
[Warning] main.pas(286): Unsafe code "@ operator"
[Warning] main.pas(287): Unsafe code "@ operator"
[Warning] main.pas(290): Unsafe type "EnumProc: Pointer"
[Warning] main.pas(298): Unsafe type "PChar"
[Warning] main.pas(298): Unsafe type "Pointer"
[Warning] main.pas(300): Unsafe type "Data: Pointer"
[Warning] main.pas(300): Unsafe typecast of "Pointer" to "TStrings"
[Warning] main.pas(301): Unsafe type "ItemName: PAnsiChar"
[Warning] main.pas(305): Unsafe type "PChar"
[Warning] main.pas(307): Unsafe type "ItemName: PAnsiChar"
[Warning] main.pas(311): Unsafe type "PChar"
[Warning] main.pas(312): Unsafe type "PChar"
[Warning] main.pas(314): Unsafe type "Pointer"
[Warning] main.pas(316): Unsafe type "Data: Pointer"
[Warning] main.pas(316): Unsafe typecast of "Pointer" to "TStrings"
[Warning] main.pas(317): Unsafe type "lpLanguageGroupString: PAnsiChar"
[Warning] main.pas(317): Unsafe type "lpLanguageGroupNameString: PAnsiChar"
[Warning] main.pas(332): Unsafe code "@ operator"
[Warning] main.pas(333): Unsafe typecast of "TStrings" to "Integer"
[Warning] main.pas(336): Unsafe type "PChar"
[Warning] main.pas(342): Unsafe code "@ operator"
[Warning] main.pas(342): Unsafe typecast of "TStrings" to "Integer"
[Warning] main.pas(368): Symbol "Win32Check" is specific to a platform
[Warning] main.pas(368): Unsafe code "@ operator"
[Warning] main.pas(369): Unsafe typecast of "TStrings" to "Integer"
[Warning] main.pas(370): Symbol "Win32Check" is specific to a platform
[Warning] main.pas(370): Unsafe code "@ operator"
[Warning] main.pas(372): Unsafe typecast of "TStrings" to "Integer"
[Warning] main.pas(378): Symbol "Win32Check" is specific to a platform
[Warning] main.pas(378): Unsafe code "@ operator"
[Warning] main.pas(381): Symbol "Win32Check" is specific to a platform
[Warning] main.pas(381): Unsafe code "@ operator"
[Warning] main.pas(389): Unsafe type "Pointer"
[Warning] main.pas(403): Unsafe type "Data: Pointer"
[Warning] main.pas(403): Unsafe typecast of "Pointer" to "TStrings"
[Warning] main.pas(403): Unsafe typecast of "HWND" to "TObject"
[Warning] main.pas(416): Unsafe code "@ operator"
[Warning] main.pas(416): Unsafe typecast of "TStrings" to "Integer"
[Warning] main.pas(420): Unsafe type "PChar"
[Warning] main.pas(426): Unsafe code "@ operator"
[Warning] main.pas(427): Unsafe typecast of "TStrings" to "Integer"
[Warning] main.pas(439): Unsafe typecast of "TObject" to "Integer"
[Warning] main.pas(452): Unsafe type "PChar"
[Warning] main.pas(473): Unsafe typecast of "TObject" to "HWND"
[Warning] main.pas(496): Unsafe type "PChar"
[Warning] main.pas(507): Unsafe type "Pointer"
[Warning] main.pas(509): Unsafe type "Buffer: Pointer"
[Warning] main.pas(510): Unsafe type "Buffer: Pointer"
[Warning] main.pas(512): Unsafe code "GetMem"
[Warning] main.pas(512): Unsafe type "Buffer: Pointer"
[Warning] main.pas(514): Unsafe type "Buffer: Pointer"
[Warning] main.pas(516): Unsafe type "Buffer: Pointer"
[Warning] main.pas(518): Unsafe typecast of "Cardinal" to "TObject"
[Warning] main.pas(521): Unsafe code "FreeMem"
[Warning] main.pas(521): Unsafe type "Buffer: Pointer"
[Warning] main.pas(548): Unsafe typecast of "TObject" to "Cardinal"
[Warning] main.pas(568): Unsafe type "PChar"
[Warning] main.pas(589): Unsafe typecast of "TObject" to "HWND"
← →
DVM © (2004-04-09 09:06) [10]Небезопасный код, указатели. Это Delphi7 что-ли ругается? В принципе ничго страшного особо нет. D6 на то же самое молчит.
← →
lehich © (2004-04-09 09:58) [11]угумс... D7 ругается... хотя всё работает замечательно
← →
Игорь Шевченко © (2004-04-09 10:15) [12]lehich © (09.04.04 08:41)
> почему внизу в окне ошибко столько надписей выводится???
Очевидно потому, что у меня нету D7 ? :)
Страницы: 1 вся ветка
Форум: "WinAPI";
Текущий архив: 2004.05.23;
Скачать: [xml.tar.bz2];
Память: 0.49 MB
Время: 0.03 c