View Single Post
  #158  
Old 23-01-2013, 07:23
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,749
Thanks: 2,170
Thanked 11,206 Times in 2,307 Posts
Razor12911 is on a distinguished road
Quote:
Originally Posted by Andre Jesus View Post
Can you give a example of glass button?
I want to change the button this instaler.
http://s9.postimage.org/pg8m175pb/Image_Setup.jpg

I wanto to learn these use two types of button:

Type 1:
http://s2.postimage.org/64jk9wgk9/button.png

Type 2:
http://advertboy.files.wordpress.com/2007/11/blue.jpg
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;

Last edited by Razor12911; 05-02-2013 at 05:45.
Reply With Quote