hImage = MImgLoadFromModule( sModule, nType, nRes, nFrame )

Loads an image from the resources of a module, e.g. a DLL or an EXE.

String: The name of the module.

Number: Specify MIMG_TYPE_ICO to load an icon resource or MIMG_TYPE_BMP to load a bitmap resource.

Number: The resource to load:

Positive value

Resource position. The function steps through the resources and loads the resource at the specified position, e.g. if you want to load the first resource, specify 1.

Negative value

Resource ID. The function loads the resource with the ID equal to the absolute value, e.g. if you want to load the resource ID 17, specify -17.

Number: Frame number. See About Frames for further information.

Number: Handle of the image or 0 if an error occurs

In this example the second frame of the icon with the resource ID 152 is loaded from shell32.dll:

Set hImage = MImgLoadFromModule( "shell32.dll", MIMG_TYPE_ICO, -152, 1 )

See also
Load functions

Created with the Personal Edition of HelpNDoc: Create help files for the Qt Help Framework