home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winui / resource / iconpro / dib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-05  |  1.5 KB  |  39 lines

  1. /****************************************************************************\
  2. *             
  3. *     FILE:     DIB.H
  4. *
  5. *     PURPOSE:  IconPro Project DIB handling header file
  6. *
  7. *     COMMENTS: Icons are stored in something almost identical to DIB
  8. *               format, which makes it real easy to treat them as DIBs
  9. *               when manipulating them.
  10. *
  11. *     Copyright 1995 - 1997 Microsoft Corp.
  12. *
  13. *
  14. * History:
  15. *                July '95 - Created
  16. *
  17. \****************************************************************************/
  18.  
  19.  
  20. /****************************************************************************/
  21. // local #defines
  22.  
  23. // How wide, in bytes, would this many bits be, DWORD aligned?
  24. #define WIDTHBYTES(bits)      ((((bits) + 31)>>5)<<2)
  25. /****************************************************************************/
  26.  
  27.  
  28. /****************************************************************************/
  29. // Exported function prototypes
  30. LPSTR FindDIBBits (LPSTR lpbi);
  31. WORD DIBNumColors (LPSTR lpbi);
  32. WORD PaletteSize (LPSTR lpbi);
  33. DWORD BytesPerLine( LPBITMAPINFOHEADER lpBMIH );
  34. LPBYTE ConvertDIBFormat( LPBITMAPINFO lpSrcDIB, UINT nWidth, UINT nHeight, UINT nColors, BOOL bStretch );
  35. void SetMonoDIBPixel( LPBYTE pANDBits, DWORD dwWidth, DWORD dwHeight, DWORD x, DWORD y, BOOL bWhite );
  36. LPBYTE ReadBMPFile( LPCTSTR szFileName );
  37. BOOL WriteBMPFile( LPCTSTR szFileName, LPBYTE lpDIB );
  38. /****************************************************************************/
  39.