forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Compiling images into .exe file...

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Tue Mar 13, 2012 5:59 pm    Post subject: Compiling images into .exe file... Reply with quote

Hi guy's I seem to remember that it was possible to include my bitmap images for my dialog scripts into the exe that I compile but I could be wrong.
Is this possible and if so can someone give me an example to work from to achieve this...

Many thanks in advance for your help.

Andy - Teamgreentech

_________________
Many thanks
Andy @ Team Green Technology
Back to top
View user's profile Send private message Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1711
Location: Space and Time

PostPosted: Wed Mar 14, 2012 12:22 pm    Post subject: Reply with quote

VDS 5 and 6. use the #Resource compiler directive.

From the help file

Code:

Syntax:

 

#RESOURCE ADD, ANIICON, file.ani, {id}

#RESOURCE ADD, BITMAP, file.bmp, {id}

#RESOURCE ADD, CURSOR, file.cur, {id}

#RESOURCE ADD, ICON, file.ico, {id}

#RESOURCE ADD, TEXT, file.* , {id}

#RESOURCE ADD, <typename>, file.*, {id}

 

Description:

 

The VDS compiler functions as a resource compiler. When resources are specified in the filename parameters of DIALOG ADD commands for BITMAP, ICON, TSAKICON and ANIICON dialog elements, a line is added to the resource script that is passed to the VDS linker. This also occurs if a resource is specified in the filename parameter of a LIST LOADFILE command, allowing text files to be embedded as resources. Custom cursors are linked automatically if a resource filename is specified in a DIALOG CURSOR, CUSTOM command. (The second parameter, CUSTOM, is no longer required in this case.)

 

The compiler will not automatically add resources specified in DIALOG SET commands, DIALOG ADD commands for BITCOMBO or BITLIST dialog elements (where they are specified as part of a text string), or where the resource file names are held in a variable. The #RESOURCE ADD directive can be used to ensure that the required files are linked into the executable file in this case.

 

The resource linker has the capability to link a Windows XP manifest into the executable file. This file is necessary to tell Windows XP to use the latest version of the common controls DLL which is XP theme-aware. This feature is selectable using the project manager.

 

The #RESOURCE directive allows you to specify files that are to be linked into the executable file as resources.

When the resource is used in a DIALOG ADD, DIALOG SET or LIST LOADFILE command, the filename must be prefixed by a '#' character.

 

Note that the resource identifier is normally generated by taking the first eight characters of the filename, not including the directory path or the extension. Windows places an 8-character limit on resource identifiers. Therefore you should ensure that your resource filenames will generate unique identifiers.

 

An identifier different from the filename may optionally be specified as an additional parameter. This is not generally advisable. When running a script in the IDE, the linked resource does not exist so it is accessed from its original file. Consequently, the filename must be used in the command that accesses the resource, prefixed by a '#' to show that the resource is to be linked when the executable is made. The ability to specify an identifier is supported for internal use and documented for possible future use by extensions.

 

The resource type MANIFEST is also supported and is used internally to add a Windows XP manifest to the compiled executable file.

 

Any resource type other than ANIICON, BITMAP, CURSOR, HTML, ICON, STRING or TEXT is treated as a user-defined resource type. The resource will be an exact copy of the file on disk. Image files to be opened using the IMAGE dialog element should be compiled using the user-defined resource type IMAGE.


_________________
Chris
Http://vdsfreak.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group