Вопрос по – Страница wpLicese проверяет, является ли позиция ScrollBars максимальной (Inno Setup)

3

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

procedure CurPageChanged(CurPageID: Integer);
 begin

     if CurPageID = wpLicense then
        WizardForm.LicenseAcceptedRadio.Enabled := False;
        WizardForm.LicenseNotAcceptedRadio.Enabled := False;

     if ScrollBar.Position := ScrollBar.Max then
        WizardForm.LicenseAcceptedRadio.Enabled := True;
        WizardForm.LicenseNotAcceptedRadio.Enabled := True;
  end;

Ваш Ответ

2   ответа
4

GetScrollInfo

[code]
const
  SB_VERT = 1;
  SIF_RANGE = 1;
  SIF_POS = 4;
  SIF_PAGE = 2;

type
  TScrollInfo = record
    cbSize: UINT;
    fMask: UINT;
    nMin: Integer;
    nMax: Integer;
    nPage: UINT;
    nPos: Integer;
    nTrackPos: Integer;
  end;

function GetScrollInfo(hWnd: HWND; BarFlag: Integer; 
  var ScrollInfo: TScrollInfo): BOOL;
  external '[email protected] stdcall';

procedure CurPageChanged(CurPageID: Integer);
var
  ScrollInfo: TScrollInfo;
begin
  if CurPageID = wpLicense then
  begin
    ScrollInfo.cbSize := SizeOf(ScrollInfo);
    ScrollInfo.fMask := SIF_RANGE or SIF_POS or SIF_PAGE;
    if GetScrollInfo(WizardForm.LicenseMemo.Handle, SB_VERT, ScrollInfo) then
      if ScrollInfo.nPos = ScrollInfo.nMax - ScrollInfo.nPage then
        MsgBox('You are at the end of the license!', mbInformation, MB_OK);
  end;
end;
Error: User Rate Limit Exceeded RobeN
Error: User Rate Limit ExceededLicenseMemoError: User Rate Limit ExceededInitializeWizardError: User Rate Limit Exceeded
Error: User Rate Limit Exceeded RobeN
2

procedure OnScrollPosition(Wnd: HWND; Msg: UINT; TimerID: UINT_PTR; 
  SysTime: DWORD);
  var
    ScrollInfo: TScrollInfo;
begin
  ScrollInfo.cbSize := SizeOf(ScrollInfo);
  ScrollInfo.fMask := SIF_RANGE or SIF_POS or SIF_PAGE;
    if GetScrollInfo(WizardForm.LicenseMemo.Handle, SB_VERT, ScrollInfo) then
       if ScrollInfo.nPos = ScrollInfo.nMax - ScrollInfo.nPage then
          begin
            WizardForm.LicenseAcceptedRadio.Enabled := True;
            WizardForm.LicenseNotAcceptedRadio.Enabled := True;
          end;
end;

procedure ScrollPosition();
var
  TimerCallback: LongWord;
begin
  TimerCallback := WrapTimerProc(@OnScrollPosition, 4);
  TimerID := SetTimer(0, 0, 500, TimerCallback);
end;

procedure CurPageChanged(CurPageID: Integer);
var
  ScrollInfo: TScrollInfo;
begin
   if CurPageID = wpInstalling then
     StartSlideTimer
   else
     KillSlideTimer;
if CurPageID = wpLicense then
  WizardForm.LicenseAcceptedRadio.Enabled := False;
  WizardForm.LicenseNotAcceptedRadio.Enabled := False;
  ScrollPosition
end;
Error: User Rate Limit ExceededWndProcError: User Rate Limit ExceededWM_VSCROLL.

Похожие вопросы