This function loads an image from the specified file into memory, creates HIGEAR handle for the image and simultaneously displays it.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_load_file_display(
const LPSTR lpszFileName,
DWORD dwGrpID,
HWND hWnd,
HDC hDC,
LPFNIG_LOAD_DISP lpfnLoadDisp,
LPVOID lpPrivateData,
LPHIGEAR lphIGear
);
|
Arguments:
lpszFileName | Pointer to filename (including path if desired) of file to load and display. |
dwGrpID | Display group identifier that should be used for display operations. |
hWnd | Handle of window where to draw image. |
hDC | Windows Device Context of device or window in which to display image. |
lpfnLoadDisp | Pointer to a callback function (or name of callback function) to call when image has been loaded, but before it is displayed. See LPFNIG_LOAD_DISP. |
lpPrivateData | Pointer to a private data area. This pointer will be passed to the callback function when it is called. |
lphIGear | pointer to a variable of type HIGEAR to hold the returned ImageGear HIGEAR handle of the newly loaded image. |
Return Value:
Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional.
Sample:
Display
Remarks:
Since you may want to set display attributes prior to displaying, ImageGear first loads the image's header, creating its HIGEAR handle, then calls your callback function (with the image's HIGEAR handle and your lpPrivate pointer) so you can set display attributes, device rectangle, image rectangle, or perform other operations. When your callback function returns, ImageGear then displays the image, one raster line at a time, as the image is loaded.
See the description for callback type LPFNIG_LOAD_DISP, and see also the section Displaying Images for a discussion of display attributes and how to set them.