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.

49 lines
1.2 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 1998, 1999, 2000
  4. *
  5. * TITLE: IMGS.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ShaunIv
  10. *
  11. * DATE: 1/13/1999
  12. *
  13. * DESCRIPTION: Image decoding and scaling wrapper.
  14. *
  15. *******************************************************************************/
  16. #ifndef __IMGS_H_INCLUDED
  17. #define __IMGS_H_INCLUDED
  18. #include <windows.h>
  19. #include "simdc.h"
  20. #include "simstr.h"
  21. class CBitmapImage
  22. {
  23. private:
  24. HBITMAP m_hBitmap;
  25. HPALETTE m_hPalette;
  26. private:
  27. operator=( const CBitmapImage & );
  28. CBitmapImage( const CBitmapImage & );
  29. public:
  30. CBitmapImage(void);
  31. virtual ~CBitmapImage(void);
  32. void Destroy(void);
  33. bool IsValid(void) const;
  34. HPALETTE Palette(void) const;
  35. HBITMAP GetBitmap(void) const;
  36. SIZE ImageSize(void) const;
  37. HPALETTE PreparePalette( CSimpleDC &dc, HBITMAP hBitmap );
  38. bool Load( CSimpleDC &dc, LPCTSTR pszFilename, const RECT &rcScreen, int nMaxScreenPercent, bool bAllowStretching, bool bDisplayFilename );
  39. bool CreateFromText( LPCTSTR pszText, const RECT &rcScreen, int nMaxScreenPercent );
  40. };
  41. #endif //__IMGS_H_INCLUDED