home *** CD-ROM | disk | FTP | other *** search
/ C/C++ User's Journal & Wi…eveloper's Journal Tools / C-C__Users_Journal_and_Windows_Developers_Journal_Tools_1997.iso / stingray / gridsvw6.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-27  |  3.4 KB  |  133 lines

  1. // gridsvw.h : interface of the CGridSample6View class
  2. //
  3.  
  4. // This is a part of the Objective Grid C++ Library.
  5. // Copyright (C) 1995,1996 ClassWorks, Stefan Hoenig.
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to
  9. // the Objective Grid Classes Reference and related
  10. // electronic documentation provided with the library.
  11. // See these sources for detailed information regarding
  12. // the Objective Grid product.
  13. //
  14.  
  15.  
  16. #ifndef _MYGRIDVW_H_
  17. #include "mygridvw.h"
  18. #endif
  19.  
  20. #ifndef _GXWND_H_
  21. #include "gxwnd.h"
  22. #endif
  23.  
  24. class CGridSample6View : public CMyGridView
  25. {
  26. protected: // create from serialization only
  27.     CGridSample6View();
  28.     DECLARE_DYNCREATE(CGridSample6View)
  29.  
  30. // Attributes
  31. public:
  32.     CGridSampleDoc* GetDocument();
  33.  
  34.     CGXGridWnd m_gridWnd;
  35.  
  36. // Operations
  37.     BOOL ConnectParam();
  38.     void SetupControls();
  39.  
  40. // Implementation
  41. public:
  42.     virtual ~CGridSample6View();
  43.     virtual void OnInitialUpdate();
  44. #ifdef _DEBUG
  45.     virtual void AssertValid() const;
  46.     virtual void Dump(CDumpContext& dc) const;
  47. #endif
  48.  
  49. // Generated message map functions
  50. protected:
  51.     //{{AFX_MSG(CGridSample6View)
  52.     afx_msg void OnViewUseractions();
  53.     afx_msg void OnViewSplitterview();
  54.     //}}AFX_MSG
  55.     DECLARE_MESSAGE_MAP()
  56. };
  57.  
  58. class CDropDownGridWnd : public CGXGridWnd
  59. {
  60.     DECLARE_DYNAMIC(CDropDownGridWnd)
  61.  
  62. public:
  63. // Construction
  64.     CDropDownGridWnd();
  65.     BOOL Create(CRect rect, CWnd* pParent = NULL);
  66.  
  67. // Attributes
  68. public:
  69.     CWnd* m_pMsgWnd;
  70.  
  71. // Operations
  72. public:
  73.  
  74. // Implementation
  75. public:
  76. #ifdef _DEBUG
  77.     virtual void AssertValid() const;
  78.     virtual void Dump(CDumpContext& dc) const;
  79. #endif
  80.  
  81. protected:
  82.     // CGXGridWnd overridden methods
  83.     virtual void OnInitialUpdate();
  84.     virtual BOOL ProcessKeys(CWnd* pSender, UINT nMessage, UINT nChar, UINT nRepCnt = 1, UINT flags = 0);
  85.     virtual BOOL OnLButtonHitRowCol(ROWCOL nHitRow, ROWCOL nHitCol, ROWCOL nDragRow, ROWCOL nDragCol, CPoint point, UINT flags, WORD nHitState);
  86.     virtual BOOL OnActivateGrid( BOOL bActivate );
  87.  
  88.     // Generated message map functions
  89.     //{{AFX_MSG(CDropDownGridWnd)
  90.     //}}AFX_MSG
  91.     DECLARE_MESSAGE_MAP()
  92. };
  93.  
  94. class CDropGridControl: public CGXEditControl
  95. {
  96.     DECLARE_CONTROL(CDropGridControl)
  97.  
  98. public:
  99.     // Constructor & Destructor
  100.     CDropGridControl(CGXGridCore* pGrid, UINT nEditID, UINT nDropGridID);
  101.     virtual ~CDropGridControl();
  102.  
  103.     virtual CRect GetCellRect(ROWCOL nRow, ROWCOL nCol, LPRECT rectItem = NULL, const CGXStyle* pStyle = NULL);
  104.  
  105. protected:
  106.     virtual void Init(ROWCOL nRow, ROWCOL nCol);
  107.     virtual void OnInitChilds(ROWCOL nRow, ROWCOL nCol, const CRect& rect);
  108.     virtual void OnClickedButton(CGXChild* pChild);
  109.     virtual BOOL MouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message, int& retval);
  110.  
  111.     // Attributes:
  112.     CGXChild*       m_pButton;
  113.     UINT            m_nDropGridID;
  114.     CDropDownGridWnd*   m_pDropDownWnd;
  115.     CDropDownGridWnd m_GridWnd;
  116.  
  117.     // Generated message map functions
  118. protected:
  119.     //{{AFX_MSG(CDropGridControl)
  120.     afx_msg LRESULT OnListBoxEnd(WPARAM, LPARAM);
  121.     afx_msg LRESULT OnListBoxCancel(WPARAM, LPARAM);
  122.     afx_msg LRESULT OnListBoxChanged(WPARAM, LPARAM);
  123.     //}}AFX_MSG
  124.     DECLARE_MESSAGE_MAP()
  125. };
  126.  
  127. #ifndef _DEBUG  // debug version in gridsvw.cpp
  128. inline CGridSampleDoc* CGridSample6View::GetDocument()
  129.    { return (CGridSampleDoc*) m_pDocument; }
  130. #endif
  131.  
  132. /////////////////////////////////////////////////////////////////////////////
  133.