Leaked source code of windows server 2003
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.

72 lines
1.3 KiB

  1. #ifdef WINVER_2
  2. typedef BITMAP BMP;
  3. #else
  4. typedef BITMAPINFOHEADER BMP;
  5. #endif
  6. #ifdef WINVER_2
  7. #define DyBmp(bmp) ((int) bmp.bmHeight)
  8. #define DxBmp(bmp) ((int) bmp.bmWidth)
  9. #define CplnBmp(bmp) (bmp.bmPlanes)
  10. #define OfsBits(bgnd) (sizeof(BMPHDR)+sizeof(BMP))
  11. #define CbLine(bgnd) (bgnd.bm.bmWidthBytes)
  12. #else
  13. #define DyBmp(bmp) ((int) bmp.biHeight)
  14. #define DxBmp(bmp) ((int) bmp.biWidth)
  15. #define CplnBmp(bmp) 1
  16. #define OfsBits(bgnd) (bgnd.dwOfsBits)
  17. #define CbLine(bgnd) (bgnd.cbLine)
  18. #endif
  19. #ifdef WINVER_2
  20. typedef INT BMPHDR;
  21. #else
  22. typedef BITMAPFILEHEADER BMPHDR;
  23. #endif
  24. typedef struct _bgnd
  25. {
  26. PT ptOrg;
  27. OFSTRUCT of;
  28. BMP bm;
  29. #ifdef WINVER_3
  30. // must folow a bm
  31. BYTE rgRGB[64]; // bug: wont work with >16 color bmps
  32. INT cbLine;
  33. LONG dwOfsBits;
  34. #endif
  35. BOOL fUseBitmap;
  36. DY dyBand;
  37. INT ibndMac;
  38. HANDLE *rghbnd;
  39. } BGND;
  40. /* PUBLIC routines */
  41. BOOL FInitBgnd(CHAR *szFile);
  42. BOOL FDestroyBgnd();
  43. BOOL FGetBgndFile(CHAR *sz);
  44. VOID DrawBgnd(X xLeft, Y yTop, X xRight, Y yBot);
  45. VOID SetBgndOrg();
  46. /* Macros */
  47. extern BGND bgnd;
  48. #define FUseBitmapBgnd() (bgnd.fUseBitmap)
  49. #define BFT_BITMAP 0x4d42 /* 'BM' */
  50. #define ISDIB(bft) ((bft) == BFT_BITMAP)
  51. #define WIDTHBYTES(i) ((i+31)/32*4) /* ULONG aligned ! */
  52. WORD DibNumColors(VOID FAR * pv);