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.

82 lines
2.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:
  7. // SUBSYSTEM:
  8. // FILE: ImageWnd.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of ImageWnd.h
  13. //----------------------------------------------------------------------------
  14. #if !defined(AFX_IMAGEWND_H__489DBF44_55BA_4047_991A_4D4396255203__INCLUDED_)
  15. #define AFX_IMAGEWND_H__489DBF44_55BA_4047_991A_4D4396255203__INCLUDED_
  16. #include "..\..\LgLib\MFC\MemoryDC.h"
  17. #if _MSC_VER > 1000
  18. #pragma once
  19. #endif
  20. #define WM_IMAGE_LBUTTONDOWN (WM_USER+1)
  21. #define WM_IMAGE_LBUTTONUP (WM_USER+2)
  22. #define WM_IMAGE_MOUSEMOVE (WM_USER+3)
  23. #include "..\DLIB\ObjectFactory.h"
  24. using namespace OFNS;
  25. typedef CList<COFTemplateDCBit*,COFTemplateDCBit*> CBitList;
  26. class CImageWnd : public CWnd
  27. {
  28. // Construction
  29. public:
  30. CImageWnd();
  31. // Attributes
  32. public:
  33. // Operations
  34. public:
  35. // Overrides
  36. // ClassWizard generated virtual function overrides
  37. //{{AFX_VIRTUAL(CImageWnd)
  38. protected:
  39. virtual void PostNcDestroy();
  40. //}}AFX_VIRTUAL
  41. // Implementation
  42. public:
  43. CBitList* GetBitList() { return &m_List; }
  44. void SetImage( HBITMAP hBitmap );
  45. void SetImage( CBitmap *pBitmap );
  46. void SetImage( CString& file );
  47. void SetImage( LPBITMAPINFO pBmi, LPBYTE pBuffer );
  48. BOOL Create( CWnd *pParentWnd, int x, int y, int cx, int cy );
  49. BOOL Create( CWnd *pParentWnd, CRect *pRect );
  50. virtual ~CImageWnd();
  51. // Generated message map functions
  52. protected:
  53. //{{AFX_MSG(CImageWnd)
  54. afx_msg void OnPaint();
  55. afx_msg void OnSize(UINT nType, int cx, int cy);
  56. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  57. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  58. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  59. //}}AFX_MSG
  60. DECLARE_MESSAGE_MAP()
  61. private:
  62. CDC m_CopyDC;
  63. CLgMemoryDC m_MemDC;
  64. CBitList m_List;
  65. };
  66. /////////////////////////////////////////////////////////////////////////////
  67. //{{AFX_INSERT_LOCATION}}
  68. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  69. #endif // !defined(AFX_IMAGEWND_H__489DBF44_55BA_4047_991A_4D4396255203__INCLUDED_)