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.

38 lines
788 B

  1. #ifndef __IMGWELL_H__
  2. #define __IMGWELL_H__
  3. // The CImageWell class provides a convenient way to handle "tiled"
  4. // bitmaps.
  5. class CImageWell
  6. {
  7. public:
  8. CImageWell();
  9. CImageWell( UINT nBitmapID, CSize imageSize );
  10. ~CImageWell();
  11. BOOL Open ();
  12. BOOL IsOpen() { return m_dc.m_hDC != NULL; }
  13. void Close ();
  14. BOOL Load ( UINT nBitmapID, CSize imageSize );
  15. void Unload();
  16. BOOL CalculateMask();
  17. BOOL DrawImage( CDC* pDestDC, CPoint destPoint, UINT nImage,
  18. DWORD rop = 0); // rop==0 means image is drawn through a mask
  19. protected:
  20. UINT m_nBitmapID;
  21. CSize m_imageSize;
  22. CBitmap m_bitmap;
  23. CDC m_dc;
  24. CBitmap m_mask;
  25. CDC m_maskDC;
  26. };
  27. #endif // __IMGWELL_H__