Article ID: 187539
Article Last Modified on 2/22/2007
// IsDIBSection()
//
// When passed the handle to a bitmap, IsDIBSection()
// will return TRUE if the bitmap referenced by the handle
// is a DIB section and FALSE if the handle references a
// device-dependent bitmap or is not a handle to a bitmap.
BOOL IsDIBSection(HANDLE hBitmap)
{
BITMAP bm;
if (!GetObject(hBitmap, sizeof(bm), &bm)) return FALSE; // It's not even a handle to a bitmap!
// If there is a pointer to the surface in the bmBits, this
// indicates that the handle is a handle to a DIB section.
return (BOOL)bm.bmBits;
}
ARTICLE-ID: <WWLINK TYPE="ARTICLE" VALUE="Q186221">Q186221</WWLINK>
TITLE : SAMPLE: DibSectn.exe Uses DIBSections in Win32
Additional query words: kbDSupport kbGDI kbBitmap
Keywords: kbhowto KB187539