не удается писать в файл больше 1 строки
сделал прогу
function EnumProc (Wd: HWnd; Param: LongInt): Boolean; stdcall; // Îáÿçàòåëüíî stdcall !!!
Var
i:integer;
Ini: Tinifile; //
Nm:Array[0..255] of Char; //
Cs: Array[0..255] of Char; //
Ch:Char; //
Begin
Ini:=TiniFile.Create(extractfilepath(paramstr(0))+ 'MyIni.ini');
GetWindowText(Wd,Nm,255); //
GetClassName(Wd,Cs,255); //
ini.WriteString(inttostr(i+1), 'programm',' '+String(Nm)+'/'+DateToStr(Date)+'/'+TimeToStr(Time));
//
If (GetWindowTextLengthW(Wd) > 0) and (IsWindow(Wd) or IsIconic(Wd)) then form1.ListBox1.Items.Add(' '+String(Nm)+'/'+DateToStr(Date)+'/'+TimeToStr(Time));
EnumProc := TRUE;
Ini.Free;
end;
записываетсья последняя строка и все
|