Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.05.13;
Скачать: CL | DM;

Вниз

Хэндл активного окна.   Найти похожие ветки 

 
cok ©   (2002-03-08 14:53) [0]

Привет All!
Как можно постоянно определять хэндл активного окна (например OnTimer)?
GetActiveWindow не подходит, т.к. цитирую:
"The GetActiveWindow function retrieves the window handle to the active window associated with the thread that calls the function."


 
Song ©   (2002-03-08 15:25) [1]

GetForeGroundWindow


 
Sasha9 ©   (2002-03-08 21:41) [2]

GetFocus


 
copyr25 ©   (2002-03-09 23:03) [3]

var
Form1: TForm1;
Wnd : hWnd;
p: byte;
implementation

{$R *.DFM}

procedure TForm1.Timer1Timer(Sender: TObject);
begin
p:=0;
Wnd := GetWindow(Handle, gw_HWndFirst);
WHILE Wnd <> 0 DO BEGIN
IF (Wnd <> Application.Handle)
AND IsWindowVisible(Wnd)
AND (GetWindow(Wnd, gw_Owner) = 0)
AND (GetWindowText(Wnd, buff, sizeof(buff)) <> 0)
and (p=0)
THEN begin
// Wnd - активное окно
p:=1;
end;
Wnd := GetWindow(Wnd, gw_hWndNext);
END;

end;

end.


 
EveryonE   (2002-03-10 06:46) [4]

GetForeGroundWindow, например: SendMessage(GetForeGroundWindow, WM_QUIT, 0, 0);... правда от это десктоп тоже умрет.. :((



Страницы: 1 вся ветка

Текущий архив: 2002.05.13;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.01 c
1-39765
MisterBin
2002-04-28 09:30
2002.05.13
Такой вот вот вопрос по использованию скинов


3-39660
Sasha L
2002-04-17 13:39
2002.05.13
Совместная работа 2 приложений (уточнение)


1-39775
VCL
2002-04-15 21:48
2002.05.13
Обработка вставки из буфера


7-39864
Andrew2
2002-02-11 10:49
2002.05.13
Запись в LPT


1-39717
ppp
2002-04-27 11:02
2002.05.13
Главное меню