Reference Guide > W Routines > WoLoadResources Procedure
  

WoLoadResources Procedure
Loads resources and strings from a file for VDA tools.
Usage
WoLoadResources, file
Input Parameters
file — The name of the resource file to be loaded.
Returned Value
None.
Keywords
Appdir — A string that specifies the application directory name. This is the directory in which the application searches for resource files, string resource files, and icon files. See the Discussion. (Default: vdatools)
Subdir — A string specifying a resource file subdirectory. See the Discussion.
Discussion
By default, the function looks for file first in directories specified by the environment variable WAVE_RESPATH. This environment variable is a colon separated list of directories, similar to the PV‑WAVE WAVE_PATH environment variable. If not found in a WAVE_RESPATH directory, the directory $WAVE_DIR/xres/!Lang/vdatools is searched, where !Lang represents the value of the !Lang system variable in PV‑WAVE.
If Subdir is specified, the file is searched for in:
(UNIX) <wavedir>/xres/subdir/vdatools
(WIN) <wavedir>\xres\subdir\vdatools
Where <wavedir> is the main PV‑WAVE directory.
If Appdir is specified, the application searches for resources in the following directory:
(UNIX) <wavedir>/xres/!Lang/appdir
(WIN) <wavedir>\xres\!Lang\appdir
Where <wavedir> is the main PV‑WAVE directory.
If Subdir and Appdir are specified, the application searches for resources in the following directory:
(UNIX) <wavedir>/xres/subdir/appdir
(WIN) <wavedir>\xres\subdir\appdir
Where <wavedir> is the main PV‑WAVE directory.
If the file to be loaded is not already in the resource database, it is loaded and added to the resource database list of files.
 
note
WoLoadResources keeps a list of the loaded files so that files aren’t redundantly loaded.
The first time WoLoadResources is invoked, it loads the file wzglobal.ad.
Example
These calls load resources and strings for the Printer Setup dialog box used in VDA Tools. This code was taken from the program woprintsetup.pro. The resource and string files are located in:
(UNIX) <wavedir>/xres/american/vdatools
(WIN) <wavedir>\xres\american\vdatools
Where <wavedir> is the main PV‑WAVE directory.
; Load resources. 
WoLoadResources, 'woprintsetup.ad'
; Load the strings.
WoLoadStrings, 'woprintsetup.ads'
See Also
WoLoadStrings, WoBuildResourceFilename

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.