home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / mfcbind / bindview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.8 KB  |  89 lines

  1. // BindView.h : interface of the CMFCBindView class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #if !defined(AFX_BINDVIEW_H__C3B1822A_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
  14. #define AFX_BINDVIEW_H__C3B1822A_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_
  15.  
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif // _MSC_VER > 1000
  19.  
  20. class CMFCBindCntrItem;
  21. class CMFCBindDoc;
  22.  
  23. class CMFCBindView : public CView
  24. {
  25. protected: // create from serialization only
  26.     CMFCBindView();
  27.     DECLARE_DYNCREATE(CMFCBindView)
  28.  
  29. // Attributes
  30. public:
  31.     CMFCBindDoc* GetDocument();
  32.     // m_pSelection holds the selection to the current CMFCBindCntrItem.
  33.     // For many applications, such a member variable isn't adequate to
  34.     //  represent a selection, such as a multiple selection or a selection
  35.     //  of objects that are not CMFCBindCntrItem objects.  This selection
  36.     //  mechanism is provided just to help you get started.
  37.  
  38.     // TODO: replace this selection mechanism with one appropriate to your app.
  39.     CMFCBindCntrItem* m_pSelection;
  40.     void OnInitialUpdate();
  41. // Operations
  42. public:
  43.  
  44. // Overrides
  45.     // ClassWizard generated virtual function overrides
  46.     //{{AFX_VIRTUAL(CMFCBindView)
  47.     public:
  48.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  49.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  50.     protected:
  51.     virtual BOOL IsSelected(const CObject* pDocItem) const;// Container support
  52.     //}}AFX_VIRTUAL
  53.  
  54. // Implementation
  55. public:
  56.     virtual ~CMFCBindView();
  57. #ifdef _DEBUG
  58.     virtual void AssertValid() const;
  59.     virtual void Dump(CDumpContext& dc) const;
  60. #endif
  61.  
  62. protected:
  63.  
  64. // Generated message map functions
  65. protected:
  66.     //{{AFX_MSG(CMFCBindView)
  67.         // NOTE - the ClassWizard will add and remove member functions here.
  68.         //    DO NOT EDIT what you see in these blocks of generated code !
  69.     afx_msg void OnDestroy();
  70.     afx_msg void OnSetFocus(CWnd* pOldWnd);
  71.     afx_msg void OnSize(UINT nType, int cx, int cy);
  72.     afx_msg void OnInsertObject();
  73.     afx_msg void OnCancelEditCntr();
  74.     //}}AFX_MSG
  75.     DECLARE_MESSAGE_MAP()
  76. };
  77.  
  78. #ifndef _DEBUG  // debug version in BindView.cpp
  79. inline CMFCBindDoc* CMFCBindView::GetDocument()
  80.    { return (CMFCBindDoc*)m_pDocument; }
  81. #endif
  82.  
  83. /////////////////////////////////////////////////////////////////////////////
  84.  
  85. //{{AFX_INSERT_LOCATION}}
  86. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  87.  
  88. #endif // !defined(AFX_BINDVIEW_H__C3B1822A_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
  89.