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
  #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)
 


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 08:05.


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