PictureHandleGet

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalNumber PictureHandleGet( SalString sPic )

The PictureHandleGet returns a Visual Toolchest handle for pictures stored in IFS Client Developer resources, Windows dll:s, or external bitmap files.

Parameters

Name Description
SalString sPic Name of the picture to retrieve a handle for. This name can be either an IFS Client Developer resource name, a dll resource name in syntax "<file name>,<resource name>", or an external bitmap file.

Returns

The return value is the picture handle.

Comments

The returned picture handle can only be used with Visual Toolchest methods (Vis* methods). Using the handle with SAL methods, e.g. SalPicSetHandle will not work.

When using the PictureHandleGet method there is no need for applications to call VisPicFree to free up memory, this is done automatically by the Cache object.

Example

Set hPicTopNode = Cache.PictureHandleGet( 'bmpNavigatorRoot' )
Set hPicFolder = Cache.PictureHandleGet(  VT_DLLName || ',' || VTPIC_Folder )
Set hPicNetworkDrive = Cache.PictureHandleGet(  'shell32.dll,155' )
Set hPicIfsLogo = CachSet hPicIfsLogo = Cache.PictureHandleGet(  'c:\ifs.bmp'' )
C# code
hPic = Var.Cache.PictureHandleGet("bmpPrinter");