home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 May / cica_0595_4.zip / cica_0595_4 / UTIL / MSWSRC35 / DIB.H < prev    next >
C/C++ Source or Header  |  1993-02-07  |  1KB  |  34 lines

  1.  
  2. #ifndef DIB_INCLUDED
  3. #define DIB_INCLUDED
  4.  
  5. // WIDTHBYTES takes # of bits in a scan line and rounds up to nearest
  6. //  word.
  7.  
  8. #define WIDTHBYTES(bits)      (((bits) + 31) / 32 * 4)
  9.  
  10.  
  11.    // Given a pointer to a DIB header, return TRUE if is a Windows 3.0 style
  12.    //  DIB, false if otherwise (PM style DIB).
  13.  
  14. #define IS_WIN30_DIB(lpbi)  ((*(LPDWORD) (lpbi)) == sizeof (BITMAPINFOHEADER))
  15.  
  16.  
  17. void     RealizeDIBPalette    (HDC hDC, LPBITMAPINFO lpbmi);
  18. WORD     DIBNumColors         (LPSTR lpbi);
  19. LPSTR    FindDIBBits          (LPSTR lpbi);
  20. WORD     PaletteSize          (LPSTR lpbi);
  21. HPALETTE CreateDIBPalette     (HANDLE hDIB);
  22. DWORD    DIBHeight            (LPSTR lpDIB);
  23. DWORD    DIBWidth             (LPSTR lpDIB);
  24. HBITMAP  DIBToBitmap          (HANDLE hDIB, HPALETTE hPal);
  25. HANDLE   BitmapToDIB          (HBITMAP hBitmap, HPALETTE hPal);
  26. void     InitBitmapInfoHeader (LPBITMAPINFOHEADER lpBmInfoHdr,
  27.                                             DWORD dwWidth,
  28.                                             DWORD dwHeight,
  29.                                               int nBPP);
  30.  
  31.  
  32. #endif // DIB_INCLUDED
  33.  
  34.