Автор: Vitalliano
Дата сообщения: 08.05.2009 08:56
А по поводу принудительного прочтения соглашения, никто не подскажет ([more=без таймера][Setup]
AppName=My Program
AppVerName=My Program v.1.2
DefaultDirName={pf}\My Program
LicenseFile=eula.rtf
[Files]
Source: compiler:InnoCallback.dll; Flags: dontcopy
[Code]
type
TProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);
const
EM_GETFIRSTVISIBLELINE = $CE; TestLine = 40;
var
TimerID: LongWord;
function WrapTimerProc(callback:TProc; paramcount:integer):longword; external 'wrapcallback@files:innocallback.dll stdcall';
function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd: LongWord; nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';
procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
var
CurrLine: integer;
begin
CurrLine:= SendMessage(WizardForm.LicenseMemo.Handle, EM_GETFIRSTVISIBLELINE, 0, 0);
If CurrLine >= TestLine then
begin
WizardForm.LicenseAcceptedRadio.Enabled:= True;
KillTimer(0, TimerID);
end;
//WizardForm.Caption:= IntToStr(CurrLine);
end;
procedure InitializeWizard();
begin
WizardForm.LicenseAcceptedRadio.Enabled:= False;
end;
procedure CurPageChanged(CurPageID: Integer);
var
pfunc: LongWord;
begin
if CurPageID = wpLicense then
begin
pfunc:= WrapTimerProc(@OnTimer, 4);
TimerID:= SetTimer(0, 0, 500, pfunc);
end else
KillTimer(0, TimerID);
end;
procedure DeinitializeSetup();
begin
KillTimer(0, TimerID);
end;[/more])???