This function loads an image from the specified file into memory, creates HIGEAR handle for the image and simultaneously displays it.
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
);
|
Name | Type | Description |
---|---|---|
lpszFileName | const LPSTR | Pointer to filename (including path if desired) of file to load and display. |
dwGrpID | DWORD | Display group identifier that should be used for display operations. |
hWnd | HWND | Handle of window where to draw image. |
hDC | HDC | Windows Device Context of device or window in which to display image. |
lpfnLoadDisp | LPFNIG_LOAD_DISP | Pointer to a callback function (or name of callback function) to call when image has been loaded, but before it is displayed. |
lpPrivateData | LPVOID | Pointer to a private data area. This pointer will be passed to the callback function when it is called. |
lphIGear | LPHIGEAR | pointer to a variable of type HIGEAR to hold the returned ImageGear HIGEAR handle of the newly loaded image. |
All pixel formats supported by ImageGear for C and C++.
Display
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.