wpQueryBitmapInfoHeader
Appearance
This method is specific to Version 4, or higher, of the OS/2 operating system.
This instance method returns the pointer to the bitmap information header for the image file.
Syntax
_wpQueryBitmapInfoHeader(somSelf)
Parameters
- somSelf (WPBitmap *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPBitmap.
Returns
- rc (PBYTE) - returns
- The bitmap information header structure.
- **NonNULL** Successful completion.
- **NULL** Error occurred.
How to Override
This method must be overridden in any subclass of WPImageFile.
Usage
The Workplace Shell calls the **wpQueryBitmapInfoHeader** function anytime it needs to examine the header for the bitmap represented by a **WPImageFile** object. For example, it can call this method to find out the size of the bitmap when calculating the characteristics needed to tile the bitmap for the background of a folder.
Remarks
This example shows how the **WPBitmap** class returns the bitmap information header.
Example Code
SOM_Scope PBYTE bmp_wpQueryBitmapInfoHeader(WPBitmap *somSelf)
{
PBITMAPFILEHEADER2 pbfh2;
ULONG ulBitmapDataSize;
pbfh2 =
(PBITMAPFILEHEADER2)_wpQueryBitmapData(somSelf,&ulBitmapDataSize);
return (ulBitmapDataSize ?
(PBYTE)&(pbfh2->bmp2) :
NULL);
}