Picture.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //-----------------------------------------------------------------------------
  2. // Picture (Prototypes) Version 1.00
  3. //
  4. // Routins 4 Showing Picture Files... (.BMP .DIB .EMF .GIF .ICO .JPG .WMF)
  5. //
  6. // Author: Dr. Yovav Gad, EMail: Sources@SuperMain.com ,Web: www.SuperMain.com
  7. //=============================================================================
  8. #if !defined(AFX_PICTURE_H__COPYFREE_BY_YOVAV_GAD__SOURCES_AT_SUPERMAIN_DOT_COM__INCLUDED_)
  9. #define AFX_PICTURE_H__COPYFREE_BY_YOVAV_GAD__SOURCES_AT_SUPERMAIN_DOT_COM__INCLUDED_
  10. #if _MSC_VER > 1000
  11. #pragma once
  12. #endif // _MSC_VER > 1000
  13. class CPicture
  14. {
  15. public:
  16. void FreePictureData();
  17. BOOL Load(CString sFilePathName);
  18. BOOL Load(UINT ResourceName, LPCSTR ResourceType);
  19. BOOL LoadPictureData(BYTE* pBuffer, int nSize);
  20. BOOL SaveAsBitmap(CString sFilePathName);
  21. BOOL Show(CDC* pDC, CPoint LeftTop, CPoint WidthHeight, int MagnifyX, int MagnifyY);
  22. BOOL Show(CDC* pDC, CRect DrawRect);
  23. BOOL ShowBitmapResource(CDC* pDC, const int BMPResource, CPoint LeftTop);
  24. BOOL UpdateSizeOnDC(CDC* pDC);
  25. CPicture();
  26. virtual ~CPicture();
  27. IPicture* m_IPicture; // Same As LPPICTURE (typedef IPicture __RPC_FAR *LPPICTURE)
  28. LONG m_Height; // Height (In Pixels Ignor What Current Device Context Uses)
  29. LONG m_Weight; // Size Of The Image Object In Bytes (File OR Resource)
  30. LONG m_Width; // Width (In Pixels Ignor What Current Device Context Uses)
  31. };
  32. #endif // !defined(AFX_PICTURE_H__COPYFREE_BY_YOVAV_GAD__SOURCES_AT_SUPERMAIN_DOT_COM__INCLUDED_)