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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-11-2014, 01:59
minh_k43sj minh_k43sj is offline
Registered User
 
Join Date: Oct 2014
Location: ho chi minh
Posts: 23
Thanks: 14
Thanked 1 Time in 1 Post
minh_k43sj is on a distinguished road
Help me about change button to image

Please help me !
How to change button (as cancel, next) to the image

THank you everyone !
Reply With Quote
Sponsored Links
  #2  
Old 10-11-2014, 06:06
Dante1995 Dante1995 is offline
Banned
 
Join Date: Feb 2014
Location: Black Hole
Posts: 297
Thanks: 116
Thanked 481 Times in 162 Posts
Dante1995 is on a distinguished road
Quote:
Originally Posted by minh_k43sj View Post
Please help me !
How to change button (as cancel, next) to the image

THank you everyone !

better give examples with jpg, so we do not know English well translated, we can better understand the message
Reply With Quote
  #3  
Old 10-11-2014, 07:56
minh_k43sj minh_k43sj is offline
Registered User
 
Join Date: Oct 2014
Location: ho chi minh
Posts: 23
Thanks: 14
Thanked 1 Time in 1 Post
minh_k43sj is on a distinguished road
Quote:
Originally Posted by Dante1995 View Post
better give examples with jpg, so we do not know English well translated, we can better understand the message


like this :

Reply With Quote
  #4  
Old 10-11-2014, 07:59
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
Use botva2. Download example from krinkels.org. For this script, it will very complicated and ugly
Reply With Quote
The Following 2 Users Say Thank You to Razor12911 For This Useful Post:
Dante1995 (10-11-2014), minh_k43sj (10-11-2014)
  #5  
Old 10-11-2014, 08:36
by_pbh by_pbh is offline
Registered User
 
Join Date: Dec 2008
Location: Romania
Posts: 4
Thanks: 4
Thanked 13 Times in 3 Posts
by_pbh is on a distinguished road
example
Code:
[Files]
Source: botva2.dll; DestDir: {tmp}; Flags: dontcopy
Source: compiler:innocallback.dll; DestDir: {tmp}; Flags: dontcopy
Source: Button.png; DestDir: {tmp}; Flags: dontcopy
 
[code/]
type
TButtonInfo = record ButtonName: array of TButton; Handle: array of HWND; Count: Integer; end;
TBtnEventProc = procedure(h:HWND);
 
const
BtnClickEventID = 1;
BtnMouseEnterEventID = 2;
BtnMouseLeaveEventID = 3;
BtnMouseMoveEventID = 4;
 
balLeft = 0;
balCenter = 1;
 
var
ButtonsBuff: TButtonInfo;
HCancelButton, HNextButton, HBackButton, HDirBrowseButton, HGroupBrowseButton: HWND;
 
function WrapBtnCallback(Callback: TBtnEventProc; ParamCount: Integer): Longword; external 'wrapcallback@files:innocallback.dll stdcall';
function BtnCreate(hParent:HWND; Left,Top,Width,Height:integer; FileName:PChar; ShadowWidth:integer; IsCheckBtn:boolean):HWND; external 'BtnCreate@{tmp}\botva2.dll stdcall delayload';
procedure BtnSetPosition(h:HWND; NewLeft, NewTop, NewWidth, NewHeight: integer); external 'BtnSetPosition@files:botva2.dll stdcall';
procedure BtnRefresh(h:HWND); external 'BtnRefresh@files:botva2.dll stdcall';
function BtnGetChecked(h:HWND):boolean; external 'BtnGetChecked@files:botva2.dll stdcall';
procedure BtnSetChecked(h:HWND; Value:boolean); external 'BtnSetChecked@files:botva2.dll stdcall';
procedure BtnSetText(h:HWND; Text:PAnsiChar); external 'BtnSetText@{tmp}\botva2.dll stdcall delayload';
procedure BtnSetTextAlignment(h:HWND; HorIndent, VertIndent:integer; Alignment:DWORD); external 'BtnSetTextAlignment@files:botva2.dll stdcall';
procedure BtnSetVisibility(h:HWND; Value:boolean); external 'BtnSetVisibility@files:botva2.dll stdcall';
function BtnGetEnabled(h:HWND):boolean; external 'BtnGetEnabled@files:botva2.dll stdcall';
procedure BtnSetEnabled(h:HWND; Value:boolean); external 'BtnSetEnabled@{tmp}\botva2.dll stdcall delayload';
procedure BtnSetFont(h:HWND; Font:Cardinal); external 'BtnSetFont@{tmp}\botva2.dll stdcall delayload';
procedure BtnSetFontColor(h:HWND; NormalFontColor, FocusedFontColor, PressedFontColor, DisabledFontColor: Cardinal); external 'BtnSetFontColor@{tmp}\botva2.dll stdcall delayload';
procedure BtnSetEvent(h:HWND; EventID:integer; Event:Longword); external 'BtnSetEvent@files:botva2.dll stdcall';
procedure BtnSetCursor(h:HWND; hCur:Cardinal); external 'BtnSetCursor@files:botva2.dll stdcall';
function GetSysCursorHandle(id:integer):Cardinal; external 'GetSysCursorHandle@files:botva2.dll stdcall';
procedure gdipShutdown; external 'gdipShutdown@files:botva2.dll stdcall';
 
procedure UpdateButtons();
var I: integer;
begin
for I:=0 to (ButtonsBuff.Count-1) do begin
BtnSetEnabled(ButtonsBuff.Handle[I], ButtonsBuff.ButtonName[I].Enabled)
BtnSetVisibility(ButtonsBuff.Handle[I], ButtonsBuff.ButtonName[I].Visible)
BtnSetText(ButtonsBuff.Handle[I], ButtonsBuff.ButtonName[I].Caption)
BtnRefresh(ButtonsBuff.Handle[I])
end;
end;
 
procedure ButtonOnClick(hBtn: HWND);
var Btn: TButton; I: Integer;
begin
for I:=0 to (ButtonsBuff.Count-1) do begin
if hBtn = ButtonsBuff.Handle[I] then Btn:= ButtonsBuff.ButtonName[I];
end;
Btn.OnClick(Btn)
UpdateButtons;
end;
 
function EffectTextureButton(Handle: HWND; Button: TButton; ImageName: PAnsiChar; ShadowWidth: Integer; EnterEvent, MoveEvent, LeaveEvent: TbtnEventProc): HWND;
begin
Result:=BtnCreate(Handle, Button.Left-8, Button.Top-8, Button.Width+16, Button.Height+16, ImageName, ShadowWidth, False) //Размеры подобраны для текущей текстуры
BtnSetEvent(Result, BtnClickEventID, WrapBtnCallback(@ButtonOnClick, 1))
if EnterEvent <> nil then BtnSetEvent(Result, BtnMouseEnterEventID, WrapBtnCallback(EnterEvent, 1));
if MoveEvent <> nil then BtnSetEvent(Result, BtnMouseMoveEventID, WrapBtnCallback(MoveEvent, 1));
if LeaveEvent <> nil then BtnSetEvent(Result, BtnMouseLeaveEventID, WrapBtnCallback(LeaveEvent, 1));
BtnSetFont(Result, Button.Font.Handle)
BtnSetText(Result, Button.Caption);
BtnSetVisibility(Result, Button.Visible);
BtnSetFontColor(Result,clBlack,clBlack,clBlack,clGray);
BtnSetCursor(Result,GetSysCursorHandle(32649));
Button.Width:=0; Button.Height:= 0;
SetArrayLength(ButtonsBuff.Handle, ButtonsBuff.Count+1);SetArrayLength(ButtonsBuff.ButtonName, ButtonsBuff.Count+1);
ButtonsBuff.ButtonName[ButtonsBuff.Count]:= Button; ButtonsBuff.Handle[ButtonsBuff.Count]:= Result;
ButtonsBuff.Count:= ButtonsBuff.Count+1;
end;
 
procedure ButtonChangeFont(ButtonHandle: HWND; Font: TFont; NormalColor, FocusedColor, PressedColor, DisabledColor: Cardinal);
begin
if Font <> nil then BtnSetFont(ButtonHandle, Font.Handle);
BtnSetFontColor(ButtonHandle, NormalColor, FocusedColor, PressedColor, DisabledColor)
end;
 
procedure InitializeWizard();
begin
ExtractTemporaryFile('Button.png')
HNextButton:= EffectTextureButton(WizardForm.Handle, WizardForm.NextButton, ExpandConstant('{tmp}\Button.png'), 18, nil, nil, nil)
HCancelButton:= EffectTextureButton(WizardForm.Handle, WizardForm.CancelButton, ExpandConstant('{tmp}\Button.png'), 18, nil, nil, nil)
HBackButton:= EffectTextureButton(WizardForm.Handle, WizardForm.BackButton, ExpandConstant('{tmp}\Button.png'), 18, nil, nil, nil)
HDirBrowseButton:= EffectTextureButton(WizardForm.Handle, WizardForm.DirBrowseButton, ExpandConstant('{tmp}\Button.png'), 18, nil, nil, nil)
HGroupBrowseButton:= EffectTextureButton(WizardForm.Handle, WizardForm.GroupBrowseButton, ExpandConstant('{tmp}\Button.png'), 18, nil, nil, nil)
end;
 
procedure CurPageChanged(CurPageId: Integer);
begin
UpdateButtons
end;
 
procedure DeinitializeSetup();
begin
gdipShutdown
end;

Last edited by by_pbh; 10-11-2014 at 08:38.
Reply With Quote
The Following 3 Users Say Thank You to by_pbh For This Useful Post:
minh_k43sj (10-11-2014), papas (03-09-2016), Razor12911 (10-11-2014)
  #6  
Old 10-11-2014, 08:39
Dante1995 Dante1995 is offline
Banned
 
Join Date: Feb 2014
Location: Black Hole
Posts: 297
Thanks: 116
Thanked 481 Times in 162 Posts
Dante1995 is on a distinguished road
or
Reply With Quote
The Following User Says Thank You to Dante1995 For This Useful Post:
Razor12911 (10-11-2014)
  #7  
Old 10-11-2014, 08:40
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
Nice example by_pbh,
What a repack name Thong Repacks, the word "Thong" lol. I am sure they make explicit repacks

Last edited by Razor12911; 10-11-2014 at 08:45.
Reply With Quote
The Following User Says Thank You to Razor12911 For This Useful Post:
minh_k43sj (10-11-2014)
  #8  
Old 10-11-2014, 09:11
Dante1995 Dante1995 is offline
Banned
 
Join Date: Feb 2014
Location: Black Hole
Posts: 297
Thanks: 116
Thanked 481 Times in 162 Posts
Dante1995 is on a distinguished road
I think he just wants to Music button

Code:
[Setup]
AppName=MusicBtn
AppVersion=MusicBtn
DefaultDirName=MusicBtn
OutputDir=.

[Files]
Source: Files\*; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system;

[ Code]
const
BtnClickEventID = 1;
var
MusicPlayed: boolean;
type
TBtnEventProc = procedure (h:HWND);
var
h,MusicBtn:HWND;

function WrapBtnCallback(Callback: TBtnEventProc; ParamCount: Integer): Longword;
external 'wrapcallbackaddr@{tmp}\CallbackCtrl.dll stdcall delayload';
function BtnCreate(hParent :HWND; Left, Top, Width, Height :integer; FileName :PAnsiChar; ShadowWidth :integer; IsCheckBtn :boolean) :HWND;
external 'BtnCreate@{tmp}\botva2.dll stdcall delayload';
procedure BtnSetEvent(h :HWND; EventID :integer; Event :Longword);
external 'BtnSetEvent@{tmp}\botva2.dll stdcall delayload';
procedure gdipShutdown;
external 'gdipShutdown@{tmp}\botva2.dll stdcall delayload';
function mciSendString(lpstrCommand, lpstrReturnString: PAnsiChar; uReturnLength: Cardinal; hWndCallback: HWND): Cardinal;
external '[email protected] stdcall';

procedure MusicButtonOnClick(hBtn:HWND);
begin
If MusicPlayed
then
begin
mciSendString('pause Music','',0,0);
MusicPlayed:=false;
end
else
begin
mciSendString('open '+ExpandConstant('{tmp}\AutorunMusic.mp3')+' alias Music','',0,0);
mciSendString('play Music repeat','',0,0);
MusicPlayed:=true;
end;
end;

procedure InitializeWizard();
begin
with WizardForm do begin
mciSendString('open '+ExpandConstant('{tmp}\AutorunMusic.mp3')+' alias Music','',0,0);
mciSendString('play Music repeat','',0,0);
MusicPlayed:=true;
MusicBtn:=BtnCreate(WizardForm.Handle,20,317,40,40,ExpandConstant('{tmp}')+'\MusicButton.png',0,True);
BtnSetEvent(MusicBtn,BtnClickEventID,WrapBtnCallback(@MusicButtonOnClick,1));
end;
end;

function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('musicbutton.png');
ExtractTemporaryFile('botva2.dll');
ExtractTemporaryFile('CallbackCtrl.dll');
ExtractTemporaryFile('AutorunMusic.mp3');
Result:=True;
end;

procedure DeinitializeSetup();
begin
gdipShutdown;
end;

Last edited by Dante1995; 28-12-2014 at 20:54.
Reply With Quote
The Following User Says Thank You to Dante1995 For This Useful Post:
minh_k43sj (10-11-2014)
  #9  
Old 10-11-2014, 11:06
minh_k43sj minh_k43sj is offline
Registered User
 
Join Date: Oct 2014
Location: ho chi minh
Posts: 23
Thanks: 14
Thanked 1 Time in 1 Post
minh_k43sj is on a distinguished road
Quote:
Originally Posted by Dante1995 View Post
I think he just wants to Music button

Code:
[Setup]
AppName=MusicBtn
AppVersion=MusicBtn
DefaultDirName=MusicBtn
OutputDir=.

[Files]
Source: Files\*; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system;

[ Code]
const
BtnClickEventID = 1;
var
MusicPlayed: boolean;
type
TBtnEventProc = procedure (h:HWND);
var
h,MusicBtn:HWND;

function WrapBtnCallback(Callback: TBtnEventProc; ParamCount: Integer): Longword;
external 'wrapcallbackaddr@{tmp}\CallbackCtrl.dll stdcall delayload';
function BtnCreate(hParent :HWND; Left, Top, Width, Height :integer; FileName :PAnsiChar; ShadowWidth :integer; IsCheckBtn :boolean) :HWND;
external 'BtnCreate@{tmp}\botva2.dll stdcall delayload';
procedure BtnSetEvent(h :HWND; EventID :integer; Event :Longword);
external 'BtnSetEvent@{tmp}\botva2.dll stdcall delayload';
procedure gdipShutdown;
external 'gdipShutdown@{tmp}\botva2.dll stdcall delayload';
function mciSendString(lpstrCommand, lpstrReturnString: PAnsiChar; uReturnLength: Cardinal; hWndCallback: HWND): Cardinal;
external '[email protected] stdcall';

procedure MusicButtonOnClick(hBtn:HWND);
begin
If MusicPlayed
then
begin
mciSendString('pause Music','',0,0);
MusicPlayed:=false;
end
else
begin
mciSendString('open '+ExpandConstant('{tmp}\AutorunMusic.mp3')+' alias Music','',0,0);
mciSendString('play Music repeat','',0,0);
MusicPlayed:=true;
end;
end;

procedure InitializeWizard();
begin
with WizardForm do begin
mciSendString('open '+ExpandConstant('{tmp}\AutorunMusic.mp3')+' alias Music','',0,0);
mciSendString('play Music repeat','',0,0);
MusicPlayed:=true;
MusicBtn:=BtnCreate(WizardForm.Handle,20,317,40,40,ExpandConstant('{tmp}')+'\MusicButton.png',0,True);
BtnSetEvent(MusicBtn,BtnClickEventID,WrapBtnCallback(@MusicButtonOnClick,1));
end;
end;

function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('musicbutton.png');
ExtractTemporaryFile('botva2.dll');
ExtractTemporaryFile('CallbackCtrl.dll');
ExtractTemporaryFile('AutorunMusic.mp3');
Result:=True;
end;

procedure DeinitializeSetup();
begin
gdipShutdown;
end;
hi, thank you everyone and Dante

but i'am nood, if you can, please add this scrip, help me !
Attached Files
File Type: rar Black Box Script.rar (14.86 MB, 46 views)

Last edited by minh_k43sj; 10-11-2014 at 11:11.
Reply With Quote
  #10  
Old 10-11-2014, 13:12
Dante1995 Dante1995 is offline
Banned
 
Join Date: Feb 2014
Location: Black Hole
Posts: 297
Thanks: 116
Thanked 481 Times in 162 Posts
Dante1995 is on a distinguished road
no friend! you have to commit... you already have the solution
Reply With Quote
The Following User Says Thank You to Dante1995 For This Useful Post:
minh_k43sj (10-11-2014)
Reply


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
Far Cry 2 Mini Image Cornflake PC Games 1 08-12-2020 05:15
How to make Crysis mini image SuppA-SnipA PC Games 15 04-12-2008 21:05
Backup Guide krondike PC Games 3 11-10-2003 21:42
Warcraft III working Image ZoneMaster43 PC Games 4 19-04-2003 17:47
change a nero cd-image into a dvd image? lizardking PS2 Games 12 30-10-2002 14:55



All times are GMT -7. The time now is 06:42.


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