Вниз
Скачать: CL | DM;

pressed всегда истина хотя на самом деле нет. Почему?   Найти похожие ветки 

← →
artist ©   (2003-06-25 16:35) [0]

procedure TForm1.myhoook(var Message: TMessage);
var
ihandle, handle1: HWND;
t: string;
ihdc: hdc;
begin
count:=0;
ihandle:=FindWindow(nil,"Adobe Illustrator");
if ihandle<>0 then
begin
EnumWindows(@EnumWindowsProc,0);
GetWindowRect(ihandle, Rct);

ihdc:=GetDC(ihandle);

if ( GetSysColor(COLOR_BTNFACE)=GetPixel(ihdc, 4, 4)) then pressed:=false else pressed:=true;

releaseDC(ihandle, ihdc);
end;


if pressed=true then
begin
Edit1.Font.Color:=clWindowText;
handle1:=FindWindow(nil,"Color");
total:=0;
flag:=false;
count:=0;

if handle1<>0 then
begin
t:=GetText(handle1);
enumChildWindows(handle1, @ChldWin, 0);
end;

t:=FloattoStr(total);
if (total>(StrToFloat(InkLimit))) then Edit1.Font.Color:=clRed;
Edit1.Text:=t;
end;
pressed:=false;
end;


← →
artist ©   (2003-06-25 16:55) [1]

При этом таже процедура но по Button1Click работает как положено. Без проблем.


← →
clickmaker ©   (2003-06-25 17:49) [2]

А вообще по какому событию эта процедура должна срабатывать?


← →
artist ©   (2003-06-25 20:30) [3]

Все. Вопрос решен. Разобрался. Дело не в процедуре. Я неправильно переменные объявил. Локальные вместо глобальных.



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

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.008 c
14-92176
Zhenka
2003-08-11 12:30
2003.08.28
Соитие файлов


3-91983
ivc_andr
2003-08-01 10:09
2003.08.28
закачать в Combobox Aliasы из BDE


3-92010
GreatMaster
2003-08-05 09:16
2003.08.28
TIBClientDataset


4-92303
alexus
2003-06-26 11:25
2003.08.28
использование BitBlt


14-92197
Mr&MsGuns
2003-08-11 02:16
2003.08.28
Ружья и розы




   Наверх