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.

48 lines
967 B

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