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

  1. // HttpView.h : interface of the CHttpSvrView class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1997-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. #define C_COLUMNS       6
  14. #define COLUMN_FILE     0
  15. #define COLUMN_PATH     1
  16. #define COLUMN_HITS     2
  17. #define COLUMN_LAST     3
  18. #define COLUMN_CMD      4
  19. #define COLUMN_URL      5
  20.  
  21. class CRequestSocket;
  22.  
  23. class CHttpSvrView : public CListView
  24. {
  25. protected: // create from serialization only
  26.     BOOL InsertHitDoc( CHitDoc* pHitDoc );
  27.     CHitDoc* m_phdPopup;
  28.     CHttpSvrView();
  29.     DECLARE_DYNCREATE(CHttpSvrView)
  30.  
  31. // Attributes
  32. public:
  33.     CHttpSvrDoc* GetDocument();
  34.  
  35. // Operations
  36. public:
  37.  
  38. // Overrides
  39.     // ClassWizard generated virtual function overrides
  40.     //{{AFX_VIRTUAL(CHttpSvrView)
  41.     public:
  42.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  43.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  44.     virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  45.     protected:
  46.     virtual void OnInitialUpdate(); // called first time after construct
  47.     virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  48.     //}}AFX_VIRTUAL
  49.  
  50. // Implementation
  51. public:
  52.     virtual ~CHttpSvrView();
  53. #ifdef _DEBUG
  54.     virtual void AssertValid() const;
  55.     virtual void Dump(CDumpContext& dc) const;
  56. #endif
  57.  
  58. protected:
  59.     void SetListView( DWORD dwStyle );
  60.     void RegisterHit( CListCtrl& list, CRequest* pRequest );
  61.     int GetImage( CHitDoc* pHit );
  62.     void DoContextMenu( const CPoint& point );
  63.  
  64.     CImageList m_ilLarge, m_ilSmall;
  65. // Generated message map functions
  66. protected:
  67.     //{{AFX_MSG(CHttpSvrView)
  68.     afx_msg void OnViewLarge();
  69.     afx_msg void OnUpdateViewLarge(CCmdUI* pCmdUI);
  70.     afx_msg void OnViewList();
  71.     afx_msg void OnUpdateViewList(CCmdUI* pCmdUI);
  72.     afx_msg void OnViewReport();
  73.     afx_msg void OnUpdateViewReport(CCmdUI* pCmdUI);
  74.     afx_msg void OnViewSmall();
  75.     afx_msg void OnUpdateViewSmall(CCmdUI* pCmdUI);
  76.     afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
  77.     afx_msg void OnGetDispInfo(NMHDR* pNMHDR, LRESULT* pResult);
  78.     afx_msg void OnDeleteItem(NMHDR* pNMHDR, LRESULT* pResult);
  79.     afx_msg void OnViewClear();
  80.     //}}AFX_MSG
  81.     afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
  82.     afx_msg void OnRclick(NMHDR* pNMHDR, LRESULT* pResult);
  83.     afx_msg void OnPopupClear();
  84.     afx_msg void OnPopupEdit();
  85.     afx_msg void OnPopupOpen();
  86.     DECLARE_MESSAGE_MAP()
  87. };
  88.  
  89. #ifndef _DEBUG  // debug version in HttpSvrView.cpp
  90. inline CHttpSvrDoc* CHttpSvrView::GetDocument()
  91.    { return (CHttpSvrDoc*)m_pDocument; }
  92. #endif
  93.  
  94. /////////////////////////////////////////////////////////////////////////////
  95.