Retrieves information about a WinGBitmap and returns a pointer to its surface.
void far *WinGGetDIBPointer(HBITMAP hWinGBitmap, BITMAPINFO far *pHeader)
Parameters
hWinGBitmap | Identifies the WinGBitmap whose surface should be retrieved. |
pHeader | If not 0, points to a buffer to receive the attributes of the WinGDC. |
Return Value
Returns a pointer to the bits of a WinGBitmap drawing surface if possible. Otherwise, WinGGetDIBPointer returns 0.
Comments
If it is supplied, the memory block indicated by pHeader must be large enough to hold a BITMAPINFOHEADER, which will be filled in by WinGGetDIBPointer with the attributes of the WinGDC. For DIB surfaces using BI_BITFIELDS compression, pHeader must contain space for an additional 3 DWORDs, in which the color masks for the DIB will be returned. See the Win32 API documentation for a discussion of BI_BITFIELDS DIBs.
If hWinGBitmap is not a WinGBitmap handle, this function will return 0 and *pHeader will remain unchanged.
Maximizing Performance
WinGCreateBitmap uses or returns the information returned by WinGGetDIBPointer as part of the creation process. If possible, applications should store the data when the WinGBitmap is created rather than calling WinGGetDIBPointer every time the information is required.
The address of a WinGBitmap surface will remain the same for the life of the WinGBitmap.
In 16 bit code, the pointer to the bits can be accessed with 32 bit offsets in assembly, like all huge objects in Windows.
See Also