Old fashion design for PC-104
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.

54 lines
1.3 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT: Laserguard libraries
  7. // SUBSYSTEM: MFC support library
  8. // FILE: MemoryDC.h
  9. // AUTHOR: Chizhevskiy Sergey
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of CLgMemoryDC
  13. //----------------------------------------------------------------------------
  14. #ifndef __MEMORY__DC__H__
  15. #define __MEMORY__DC__H__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include "..\LgImageDIB.h"
  20. class CLgMemoryDC : public CDC
  21. {
  22. public:
  23. CLgMemoryDC();
  24. virtual ~CLgMemoryDC();
  25. public:
  26. BOOL Create( HBITMAP hBitmap, BOOL bCopy = TRUE );
  27. BOOL Create( int cx, int cy, COLORREF color = RGB(0,0,0) );
  28. public:
  29. enum { ORIGINAL_BIT_COUNT = -1 };
  30. public:
  31. BOOL SaveDIB( LPCTSTR pFileName, INT nBitCount = ORIGINAL_BIT_COUNT );
  32. virtual BOOL DeleteDC( );
  33. const CSize& GetSize() const { return m_Size; }
  34. public:
  35. static BOOL SaveDIB( LPBITMAPINFO pBitmapInfo, LPBYTE pByte, LPCTSTR pFileName );
  36. public:
  37. BOOL ConvertToDIB( CLgImageDIB &dib );
  38. private:
  39. CSize m_Size;
  40. CBitmap m_Bitmap;
  41. CBitmap*m_pBitmap;
  42. };
  43. #endif