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.

56 lines
886 B

  1. //
  2. // maskbmp.h
  3. //
  4. #ifndef MASKBMP_H
  5. #define MASKBMP_H
  6. #include "cmydc.h"
  7. HICON StretchIcon(HICON hIcon, int cxNew, int cyNew);
  8. extern HINSTANCE g_hInst;
  9. class CMaskBitmap
  10. {
  11. public:
  12. CMaskBitmap()
  13. {
  14. _hbmp = NULL;
  15. _hbmpMask = NULL;
  16. }
  17. ~CMaskBitmap()
  18. {
  19. Clear();
  20. }
  21. void Clear()
  22. {
  23. if (_hbmp)
  24. {
  25. DeleteObject(_hbmp);
  26. _hbmp = NULL;
  27. }
  28. if (_hbmpMask)
  29. {
  30. DeleteObject(_hbmpMask);
  31. _hbmpMask = NULL;
  32. }
  33. }
  34. BOOL Init(int nId, int cx, int cy, COLORREF rgb);
  35. BOOL Init(HICON hIcon, int cx, int cy, COLORREF rgb);
  36. HBITMAP GetBmp() {return _hbmp;}
  37. HBITMAP GetBmpMask() {return _hbmpMask;}
  38. private:
  39. HBITMAP _hbmp;
  40. HBITMAP _hbmpMask;
  41. };
  42. #endif // MASKBMP_H