Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 13-02-2013, 08:12
Andre Jesus's Avatar
Andre Jesus Andre Jesus is offline
Registered User
 
Join Date: Jun 2012
Location: Brazil
Posts: 70
Thanks: 11
Thanked 0 Times in 0 Posts
Andre Jesus is on a distinguished road
Quote:
Originally Posted by Razor12911 View Post
here is example

[Files]
Source: buttons.png; DestDir: {tmp}; Flags: dontcopy

[Code]
var
hback, hnext, hcancel :Longint
ButtonFont: TFont;

procedure SetStateNewButtons;
begin

with WizardForm.BackButton do begin
BtnSetText(hBackBtn,PAnsiChar(Caption));
BtnSetVisibility(hBackBtn,Visible);
BtnSetEnabled(hBackBtn,Enabled);
end;

with WizardForm.NextButton do begin
BtnSetText(hNextBtn,PAnsiChar(Caption));
BtnSetVisibility(hNextBtn,Visible);
BtnSetEnabled(hNextBtn,Enabled);
end;

with WizardForm.CancelButton do begin
BtnSetText(hCancelBtn,PAnsiChar(Caption));
BtnSetVisibility(hCancelBtn,Visible);
BtnSetEnabled(hCancelBtn,Enabled);
end;
end;


procedure WizardFormBtnClick(hBtn:HWND);
var
Btn:TButton;
begin
case hBtn of
hCancelBtn: Btn:=WizardForm.CancelButton;
hNextBtn: Btn:=WizardForm.NextButton;
hBackBtn: Btn:=WizardForm.BackButton;
hDirBrowseBtn: Btn:=WizardForm.DirBrowseButton;
hGroupBrowseBtn: Btn:=WizardForm.GroupBrowseButton;
end;
Btn.OnClick(Btn);
SetStateNewButtons;
BtnRefresh(hBtn);
end;

Procedure ButtonsTexture;
begin
ButtonFont:=TFont.Create;
ButtonFont.Name:='Arial';
ButtonFont.Size:=13;
ButtonFont.Color:=$FFFFFF;
with WizardForm.BackButton do begin
hBackBtn:=BtnCreate(WizardForm.Handle,Left-52,Top-65,Width+25,Height+16,ExpandConstant('{tmp}\button .png'),18,False);
BtnSetEvent(hBackBtn,BtnClickEventID,WrapBtnCallba ck(@WizardFormBtnClick,1));
BtnSetFont(hBackBtn,ButtonFont.Handle);
BtnSetFontColor(hBackBtn,$DAE369,$DAE369,$DAE369,$ B6B6B6);
BtnSetCursor(hBackBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;

with WizardForm.NextButton do begin
hNextBtn:=BtnCreate(WizardForm.Handle,Left-28,Top-65,Width+25,Height+16,ExpandConstant('{tmp}\button .png'),18,False);
BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallba ck(@WizardFormBtnClick,1));
BtnSetFont(hNextBtn,WFButtonFont.Handle);
BtnSetFontColor(hNextBtn,$DAE369,$DAE369,$DAE369,$ B6B6B6);
BtnSetCursor(hNextBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;

with WizardForm.CancelButton do begin
hCancelBtn:=BtnCreate(WizardForm.Handle,Left-223,Top-65,Width+25,Height+16,ExpandConstant('{tmp}\button .png'),18,False);
BtnSetEvent(hCancelBtn,BtnClickEventID,WrapBtnCall back(@WizardFormBtnClick,1));
BtnSetFont(hCancelBtn,ButtonFont.Handle);
BtnSetFontColor(hCancelBtn,$DAE369,$DAE369,$DAE369 ,$B6B6B6);
BtnSetCursor(hCancelBtn,GetSysCursorHandle(32649)) ;
Width:=0;
Height:=0;
end;

with WizardForm.DirBrowseButton do begin
hDirBrowseBtn:=BtnCreate(WizardForm.Handle,Left+15 0,Top+55,Width-40,Height+10,ExpandConstant('{tmp}\browse.png'),6, False);
BtnSetEvent(hDirBrowseBtn,BtnClickEventID,WrapBtnC allback(@WizardFormBtnClick,1));
BtnSetFont(hDirBrowseBtn,ButtonFont.Handle);
BtnSetFontColor(hDirBrowseBtn,$DAE369,$DAE369,$DAE 369,$B6B6B6);
BtnSetCursor(hDirBrowseBtn,GetSysCursorHandle(3264 9));
Width:=0;
Height:=0;
end;

with WizardForm.GroupBrowseButton do begin
hGroupBrowseBtn:=BtnCreate(WizardForm.Handle,Left+ 150,Top+55,Width-40,Height+10,ExpandConstant('{tmp}\browse.png'),6, False);
BtnSetEvent(hGroupBrowseBtn,BtnMouseEnterEventID,W rapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hGroupBrowseBtn,BtnClickEventID,WrapBt nCallback(@WizardFormBtnClick,1));
BtnSetFont(hGroupBrowseBtn,ButtonFont.Handle);
BtnSetFontColor(hGroupBrowseBtn,$DAE369,$DAE369,$D AE369,$B6B6B6);
BtnSetCursor(hGroupBrowseBtn,GetSysCursorHandle(32 649));
Width:=0;
Height:=0;
end;
end;
Razor 12911.

Thank you man, but donīt work.
Can you please revised the script? I think that problem is in var:

Code:
var
hback, hnext, hcancel :Longint
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 05:51
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 06:57
Frequently Asked Questions Joe Forster/STA PC Games - Frequently Asked Questions 0 29-11-2005 09:48



All times are GMT -7. The time now is 08:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com