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.

79 lines
1.9 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: 25/11/2001
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: ListWnd.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of ListWnd.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __LIST__WND__H__INCLUDED__
  15. #define __LIST__WND__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include "..\..\LgLib\MFC\MemoryDC.h"
  20. class CListWnd : public CWnd
  21. {
  22. public:
  23. CListWnd();
  24. virtual ~CListWnd();
  25. public:
  26. // ClassWizard generated virtual function overrides
  27. //{{AFX_VIRTUAL(CListWnd)
  28. public:
  29. virtual BOOL DestroyWindow();
  30. //}}AFX_VIRTUAL
  31. public:
  32. virtual BOOL Create( CWnd *pParentWnd, int x, int y, int nWidth, int nHeight );
  33. public:
  34. void* GetItemFromPoint( CPoint* pPoint );
  35. BOOL SetItemSize( CSize size );
  36. BOOL Remove( void* pItem );
  37. BOOL Add( void* pItem );
  38. void RemoveAll();
  39. protected:
  40. virtual void OnItemMove( void* pItem, CRect *pRect, BOOL bShow ) {}
  41. virtual void OnItemAdd( void* pItem ) {}
  42. virtual void OnItemRemove( void *pItem ) {}
  43. virtual void OnItemDraw( CDC *pDC, CRect *pRect, void *pItem ) {}
  44. protected:
  45. //{{AFX_MSG(CListWnd)
  46. afx_msg void OnPaint();
  47. afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  48. afx_msg void OnSize(UINT nType, int cx, int cy);
  49. //}}AFX_MSG
  50. DECLARE_MESSAGE_MAP()
  51. protected:
  52. BOOL GetItemRect( INT nIndex, CRect* pRect );
  53. void MoveItems();
  54. protected:
  55. CSize m_ItemSize;
  56. CSize m_Space;
  57. CSize m_Dimensions;
  58. int m_nItemVisibleFirst;
  59. int m_nItemVisibleLast;
  60. int m_nItemScrollMin;
  61. int m_nItemScrollMax;
  62. int m_nItemScrollPos;
  63. CArray< void*, void* > m_ArrayItem;
  64. CMemoryDC m_MemoryDC;
  65. };
  66. //{{AFX_INSERT_LOCATION}}
  67. #endif