DIBAPI.H
上传用户:zbjinju
上传日期:2022-07-30
资源大小:11893k
文件大小:2k
源码类别:

图形图象

开发平台:

Visual C++

  1. // dibapi.h
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. #ifndef _INC_DIBAPI
  13. #define _INC_DIBAPI
  14. /* Handle to a DIB */
  15. DECLARE_HANDLE(HDIB);
  16. /* DIB constants */
  17. #define PALVERSION   0x300
  18. /* DIB Macros*/
  19. #define IS_WIN30_DIB(lpbi)  ((*(LPDWORD)(lpbi)) == sizeof(BITMAPINFOHEADER))
  20. #define RECTWIDTH(lpRect)     ((lpRect)->right - (lpRect)->left)
  21. #define RECTHEIGHT(lpRect)    ((lpRect)->bottom - (lpRect)->top)
  22. // WIDTHBYTES performs DWORD-aligning of DIB scanlines.  The "bits"
  23. // parameter is the bit count for the scanline (biWidth * biBitCount),
  24. // and this macro returns the number of DWORD-aligned bytes needed
  25. // to hold those bits.
  26. #define WIDTHBYTES(bits)    (((bits) + 31) / 32 * 4)
  27. /* Function prototypes */
  28. BOOL      WINAPI  PaintDIB (HDC, LPRECT, HDIB, LPRECT, CPalette* pPal);
  29. BOOL      WINAPI  CreateDIBPalette(HDIB hDIB, CPalette* cPal);
  30. LPSTR     WINAPI  FindDIBBits (LPSTR lpbi);
  31. DWORD     WINAPI  DIBWidth (LPSTR lpDIB);
  32. DWORD     WINAPI  DIBHeight (LPSTR lpDIB);
  33. WORD      WINAPI  PaletteSize (LPSTR lpbi);
  34. WORD      WINAPI  DIBNumColors (LPSTR lpbi);
  35. HGLOBAL   WINAPI  CopyHandle (HGLOBAL h);
  36. BOOL      WINAPI  SaveDIB (HDIB hDib, CFile& file);
  37. HDIB      WINAPI  ReadDIBFile(CFile& file);
  38. #endif //!_INC_DIBAPI