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.

59 lines
2.0 KiB

  1. // This stuff is not going to work for win64
  2. #pragma warning(disable:4312)
  3. #define BM_NULL 0
  4. #define BM_TYPE 0x0F // type mask
  5. #define BM_8BIT 0x01 // all SVGA, and other 256 color
  6. #define BM_16555 0x02 // some HiDAC cards
  7. #define BM_24BGR 0x03 // just like a DIB
  8. #define BM_32BGR 0x04 // 32 bit BGR
  9. #define BM_VGA 0x05 // VGA style bitmap.
  10. #define BM_16565 0x06 // most HiDAC cards
  11. #define BM_24RGB 0x07 // 24 bit RGB
  12. #define BM_32RGB 0x08 // 32 bit RGB
  13. #define BM_1BIT 0x09 // mono bitmap
  14. #define BM_4BIT 0x0A // 4 bit packed pixel.
  15. #define BM_CANLOCK 0x10 // can lock these bitmaps
  16. #define BM_MAPFLAT 0x20 // can make bitmaps flat
  17. #define BM_HUGE 0x40 // with FillBytes != 0 (for > 64k)
  18. #define BM_BOTTOMTOTOP 0x80 // like a DIB
  19. //
  20. // this is a physical BITMAP in memory, this is just like a BITMAP
  21. // structure, but with extra fields staring at bmWidthPlanes
  22. //
  23. typedef struct {
  24. short bmType;
  25. short bmWidth;
  26. short bmHeight;
  27. short bmWidthBytes;
  28. BYTE bmPlanes;
  29. BYTE bmBitsPixel;
  30. LPVOID bmBits;
  31. long bmWidthPlanes;
  32. long bmlpPDevice;
  33. short bmSegmentIndex;
  34. short bmScanSegment;
  35. short bmFillBytes;
  36. short reserved1;
  37. short reserved2;
  38. } IBITMAP;
  39. #define bmBitmapInfo bmWidthPlanes
  40. #define bmOffset bmlpPDevice
  41. #define bmNextScan reserved1
  42. BOOL FAR CanLockBitmaps(void);
  43. UINT FAR GetBitmapType(void);
  44. LPVOID FAR LockBitmap(HBITMAP hbm);
  45. LPVOID FAR GetBitmap(HBITMAP hbm, LPVOID p, int cb);
  46. LPVOID FAR GetBitmapDIB(LPBITMAPINFOHEADER lpbi, LPVOID lpBits, LPVOID p, int cb);
  47. LPVOID FAR GetDIBBitmap(HBITMAP hbm, LPBITMAPINFOHEADER lpbi);
  48. LPVOID FAR GetPDevice(HDC hdc);
  49. void FAR TestSurfaceType(HDC hdc, int x, int y);
  50. UINT FAR GetSurfaceType(LPVOID lpBits);
  51. BOOL FAR MakeBitmapFlat(HBITMAP hbm);
  52. //void FAR BitmapXY(IBITMAP FAR *pbm, int x, int y);