www.pudn.com > NetPaw.rar > FileView.h


#pragma once 
 
 
class CNetPawDoc; 
// CFileView 视图 
class CFileView : public CListView 
{ 
	DECLARE_DYNCREATE(CFileView) 
 
protected: 
	CFileView();           // 动态创建所使用的受保护的构造函数 
	virtual ~CFileView(); 
 
public: 
	CNetPawDoc* GetDocument(); 
 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected: 
	afx_msg void OnLvnItemChanged(NMHDR *pNMHDR, LRESULT *pResult); 
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); 
	afx_msg void OnBtnRestart(); 
	afx_msg void OnUpdateBtnRestart(CCmdUI *pCmdUI); 
	afx_msg void OnBtnStop(); 
	afx_msg void OnUpdateBtnStop(CCmdUI *pCmdUI); 
	afx_msg void OnDlItemDelete(); 
	afx_msg void OnUpdateDlItemDelete(CCmdUI *pCmdUI); 
	afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu); 
	DECLARE_MESSAGE_MAP() 
 
public: 
	int m_nShowClassID; 
 
protected: 
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 
	virtual void OnInitialUpdate(); 
	virtual void OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/); 
 
public: 
	void AddFileItem(LPCTSTR szFileName, LONGLONG nLength); 
	void UpdateRatio(PERFITEM_S *pstPerfIT); 
	void GetSelectedFileName(CString& sFileName); 
	void OnTreeItemChanged(int nClassID); 
	void ShowDownldFiles(void); 
	void ShowDownlded(void); 
	void ShowFavorites(void); 
	void AddDownldedItem(DONEITEM_S *pstDoneIt); 
	void UpdateDownldItems(void); 
}; 
 
#ifndef _DEBUG  // FileView.cpp 的调试版本 
inline CNetPawDoc* CFileView::GetDocument() 
   { return reinterpret_cast(m_pDocument); } 
#endif