Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1.3 KiB

  1. /*----------------------------------------------------------------------------*\
  2. | Routines for dealing with Device independent bitmaps |
  3. | |
  4. | History: |
  5. | 06/23/89 toddla Created |
  6. | |
  7. \*----------------------------------------------------------------------------*/
  8. HANDLE OpenDIB(LPTSTR szFile, HFILE fh);
  9. UINT PaletteSize(VOID FAR * pv);
  10. UINT DibNumColors(VOID FAR * pv);
  11. HANDLE DibFromBitmap(HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal, UINT wUsage);
  12. BOOL DibBlt(HDC hdc, int x0, int y0, int dx, int dy, HANDLE hdib, int x1, int y1, LONG rop, UINT wUsage);
  13. BOOL DibInfo(LPBITMAPINFOHEADER lpbiSource, LPBITMAPINFOHEADER lpbiTarget);
  14. HANDLE ReadDibBitmapInfo(HFILE fh);
  15. #define BFT_ICON 0x4349 /* 'IC' */
  16. #define BFT_BITMAP 0x4d42 /* 'BM' */
  17. #define BFT_CURSOR 0x5450 /* 'PT' */
  18. #define WIDTHBYTES(i) ((i+31)/32*4) /* ULONG aligned ! */
  19. #define ALIGNULONG(i) ((i+3)/4*4) /* ULONG aligned ! */
  20. #define ISDIB(bft) ((bft) == BFT_BITMAP)
  21. #define DIBWIDTHBYTES(bi) (int)WIDTHBYTES((int)(bi).biWidth * (int)(bi).biBitCount)