Solid Fluid System Solutions  
Home Software About Hardware Firmware

Document Icon VConsole (Library)
Document Icon Crypto
Document Icon Archive
Document Icon Container
Document Icon Pipe
Document Icon Compress
Document Icon Math
Document Icon Vector
Document Icon DateTime
Document Icon List/Array
Document Icon HashIntegerFloat
Document Icon Database
Document Icon Thread
Document Icon String
Document Icon Machine
Document Icon Regex
Document Icon SGMLParse
Document Icon HTTPHeader
Document Icon Comm
Document Icon Collab
Document Icon HierAgent
Current Document Icon Resource
Document Icon Colour
Document Icon Image

Resource

The resource group provides the facility for compiling multiple resources into a single resource file. The resource file would typically be merged with an application or library binary (.exe or .dll), and then used by an application at run time for the creation of resources like dialogs, and icons.

The resource group supports the console part of the capability for an application resource compiler. Using SGMLParse it is possible to create resource files, by collating images and text. By adding context to this information in the SGML resource file, it is possible to build the following entities for use in applications;

  • Images
  • Image swatches
  • Commands
  • Menus
  • Toolbars
  • Controls
  • Property pages
  • Property groups
  • Dialogs
  • Document templates
  • Window templates

Typically these resource items are nested. A command, for example, consists of a command id, a reference to an image swatch item, and a menu text string. Menus consist of commands. Dialogs consist of controls and property groups.

In addition resources may be inherited, so the resources of a library module can be inherited and extended by an executable module.

A resource binary is manufactured from an SGML resource file using VRC, the Solid Fluid resource compiler. VRC automatically creates a header file that can be included in the application project. Whilst running the VRC checks for conflicts in identifier names to ensure they are unique. Commands support accelerator and shortcut keys, and these too are tested for conflicts.

A screenshot of the VObjects resource compiler in action

The binary produced is then included in the executable module or dynamic link library, by the use of the C++ compiler's own resource compiler.

When the compiled application starts the base application object knows about resources and loads them. Once the application is running, menus, dialogs and images can be loaded and placed on the desktop in just a few simple function calls.

Copyright © Solid Fluid 2007-2022
Last modified: SolFlu  Mon, 08 Jun 2009 19:22:50 GMT