LoadTGAIntoBitmap

#include "BITGA.H"

 

HBITMAP CALLBACK LoadTGAIntoBitmap( LPTSTR lpszFileName,
BOOL    bDispInfo)

Description

This function loads the nth image from the TGA file lpszFileName into a bitmap. It performs all low-level calls internally in the DLL. The handle to the bitmap is NULL if any error occurs. To retrieve the last error, use the TgaErrorString(...). If the “bDispInfo” is set to TRUE, a dialog box is displayed with the characteristic information of the image, such as width, length, etc.

Parameters

LPTSTR

lpszFileName

Destination file name

BOOL

bDispInfo

Setting this parameter to a “TRUE” value would display the file open dialog box for the TGA image.

Additional Information

This example shows how to use the dll when loading statically including the header file. Otherwise if the dll is loaded dynamically, for further information read the “About the difference of static and dynamic library loading” section of the manual.

Return values

Handle to a bitmap or NULL if the function call fails. Call GetTGAError(...) for the error code and call GetTGAErrorString(...) for an error description.

Programming notes

This function was designed to be used with high-level application generators like Borland C++, Visual Basic, SQL Windows, Actor, or Asymetric’s Toolbook.

Requirements

Header :     Declared in BiTGA.h; include BiTGA.h.

Library :    Use BiTGA.lib.

DLLs :       BiTGA.dll.

Code example

None at present.