var
InfoForm: TSetupForm;
RichEditViewer: TRichEditViewer;
NewButton: TNewButton;
Readme: ansistring;
CloseBtn : HWND;
procedure CloseBtnClick(hBtn:HWND);
begin
InfoForm.Close;
end;
procedure InfoBtnClick(hBtn:HWND);
begin
ExtractTemporaryFile('ReadMeRus.rtf');
LoadStringFromFile(ExpandConstant('{tmp}')+'\ReadMeRus.rtf', Readme);
InfoForm := CreateCustomForm();
with InfoForm do
begin
ClientWidth:=ScaleX(325);
ClientHeight:=ScaleY(225);
Caption := 'Информация';
Color := $302d2d;
CenterInsideControl(WizardForm, False);
RichEditViewer := TRichEditViewer.Create(InfoForm);
with RichEditViewer do
begin
SetBounds(ScaleX(12),ScaleY(12),ScaleX(301),ScaleY(165));
Parent := InfoForm;
Font.Size := 8;
RTFText:= Readme;
ScrollBars:= ssVertical;
ReadOnly := True;
Color := $262525;
end;
// NewButton := TNewButton.Create(InfoForm);
//with NewButton do
//begin
// SetBounds(ScaleX(240),ScaleY(189),ScaleX(75),ScaleY(23));
// Parent := InfoForm;
// Caption := 'ОК';
// ModalResult := mrOk;
//end;
CloseBtn:=BtnCreate(InfoForm.Handle,285, 189,28,28,PAnsiChar(ExpandConstant('{tmp}\Button2.png')),1,False);
BtnSetEvent(CloseBtn,BtnClickEventID,WrapBtnCallback(@CloseBtnClick,1));
BtnSetText(CloseBtn,ExpandConstant('ok'));
BtnSetFontColor(CloseBtn,$22A4CA,$0000FF,$000000,$B6B6B6);
ImgApplyChanges(InfoForm.Handle);
ShowModal;
Free;
end;
end;