home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / labs / c10 / lab01 / baseline / browserview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.8 KB  |  67 lines

  1. // BrowserView.h : interface of the CBrowserView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CBrowserView : public CFormView
  6. {
  7. protected: // create from serialization only
  8.     CBrowserView();
  9.     DECLARE_DYNCREATE(CBrowserView)
  10.  
  11. public:
  12.     void GetDBNames( int nInfo );  //Get names from database, fill the list
  13.     //{{AFX_DATA(CBrowserView)
  14.     enum { IDD = IDD_BROWSER_FORM };
  15.     CListBox    m_List;
  16.     CTabCtrl    m_Tab;
  17.     CString    m_ListSelect;
  18.     //}}AFX_DATA
  19.  
  20. // Attributes
  21. public:
  22.     CBrowserDoc* GetDocument();
  23.     enum { TABLE = 0, QUERY, RELATION, };  //Make the code readable
  24. // Operations
  25. public:
  26.  
  27. // Overrides
  28.     // ClassWizard generated virtual function overrides
  29.     //{{AFX_VIRTUAL(CBrowserView)
  30.     public:
  31.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  32.     virtual void OnInitialUpdate();
  33.     protected:
  34.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  35.     virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  36.     virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
  37.     //}}AFX_VIRTUAL
  38.  
  39. // Implementation
  40. public:
  41.     virtual ~CBrowserView();
  42. #ifdef _DEBUG
  43.     virtual void AssertValid() const;
  44.     virtual void Dump(CDumpContext& dc) const;
  45. #endif
  46.  
  47. protected:
  48.  
  49. // Generated message map functions
  50. protected:
  51.     //{{AFX_MSG(CBrowserView)
  52.     afx_msg void OnSelchangeTab(NMHDR* pNMHDR, LRESULT* pResult);
  53.     afx_msg void OnUpdateViewTable(CCmdUI* pCmdUI);
  54.     afx_msg void OnUpdateViewQuery(CCmdUI* pCmdUI);
  55.     afx_msg void OnViewData();
  56.     afx_msg void OnDblclkList();
  57.     //}}AFX_MSG
  58.     DECLARE_MESSAGE_MAP()
  59. };
  60.  
  61. #ifndef _DEBUG  // debug version in BrowserView.cpp
  62. inline CBrowserDoc* CBrowserView::GetDocument()
  63.    { return (CBrowserDoc*)m_pDocument; }
  64. #endif
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67.