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.

43 lines
1.4 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: bmpimage.h
  4. //
  5. // Module: CMAK.EXE and CMDIAL32.DLL
  6. //
  7. // Synopsis: Definition of the CM Bitmap display routines.
  8. //
  9. // Copyright (c) 1996-1998 Microsoft Corporation
  10. //
  11. // Author: quintinb/nickball Created 08/06/98
  12. //
  13. //+----------------------------------------------------------------------------
  14. #ifndef _BMP_IMAGE_H
  15. #define _BMP_IMAGE_H
  16. #include <windows.h>
  17. #include "cmutil.h"
  18. #include "cmdebug.h"
  19. typedef struct tagBmpData
  20. {
  21. HBITMAP hDIBitmap; // bitmap, in device-independent format
  22. HBITMAP hDDBitmap; // bitmap, in device-dependent format
  23. LPBITMAPINFO pBmi; // bitmap info for the bitmap, the raw bits
  24. HPALETTE *phMasterPalette; // Master Palette, used when displaying any bitmap
  25. BOOL bForceBackground; // determines background/foreground mode
  26. } BMPDATA, *LPBMPDATA;
  27. LPBITMAPINFO CmGetBitmapInfo(HBITMAP hbm);
  28. static HPALETTE CmCreateDIBPalette(LPBITMAPINFO pbmi);
  29. void ReleaseBitmapData(LPBMPDATA pBmpData);
  30. BOOL CreateBitmapData(HBITMAP hDIBmp, LPBMPDATA lpBmpData, HWND hwnd, BOOL fCustomPalette);
  31. LRESULT CALLBACK BmpWndProc(HWND hwndBmp, UINT uMsg, WPARAM wParam, LPARAM lParam);
  32. void QueryNewPalette(LPBMPDATA lpBmpData, HWND hwndDlg, int iBmpCtrl);
  33. void PaletteChanged(LPBMPDATA lpBmpData, HWND hwndDlg, int iBmpCtrl);
  34. HBITMAP CmLoadBitmap(HINSTANCE hInst, LPCTSTR pszSpec);
  35. #endif // _BMP_IMAGE_H