FilesListCtrl.h
资源名称:GGBT.rar [点击查看]
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:4k
源码类别:
P2P编程
开发平台:
Visual C++
- #if !defined(AFX_FILESLISTCTRL_H__DDCB9AC9_603C_4945_9798_670F1A1DD128__INCLUDED_)
- #define AFX_FILESLISTCTRL_H__DDCB9AC9_603C_4945_9798_670F1A1DD128__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // FilesListCtrl.h : header file
- //
- #include "ListCtrlBase.h"
- #include "ctrlext.h"
- #include "ListCtrlBaseEx.h"
- #include "MenuSpawn.h"
- class CMonitorWnd;
- class CFileDBItem;
- class CCategoryBarWnd;
- class CSetupRegister;
- /////////////////////////////////////////////////////////////////////////////
- // CFilesListCtrl window
- class CFilesListCtrl : public CListCtrlBaseEx // CListCtrl
- {
- // Construction
- public:
- CFilesListCtrl();
- // Attributes
- public:
- CTreeCursor m_curCursor;
- vector<CFileDBItem*> m_vDragFileDBItems;
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CFilesListCtrl)
- public:
- virtual BOOL PreTranslateMessage(MSG* pMsg);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CFilesListCtrl();
- BOOL CreateEx(CWnd* pParent, CRect& rc, long lParam, CMonitorWnd* pMonitorWnd, CCategoryBarWnd* pCategoryBarWnd, CSetupRegister* pSetupRegister);
- void SetSetupParameter();
- void LoadCatetory(CTreeCursor curItem, CFileDBItem* pFileDBItemSel = 0);
- void OnDownloadTerminated(long lParam, bool bCompletedMove);
- void OnUpdateMenuitem(CCmdUI* pCmdUI);
- void OnCommandMenuitem(UINT iID);
- // Generated message map functions
- protected:
- //{{AFX_MSG(CFilesListCtrl)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
- afx_msg void OnMenuitemDel();
- afx_msg void OnMenuitemDownload();
- afx_msg void OnItemchanged(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnMenuitemStop();
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg void OnDestroy();
- afx_msg void OnMenuitemMoveto();
- afx_msg void OnMenuitemFileProperty();
- afx_msg void OnMenuitemCopyTorrentFilePath();
- afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
- afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
- //}}AFX_MSG
- afx_msg void OnItemDblclk(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnMenuitemMonitorSub(UINT uID);
- afx_msg void OnMenuitemPause();
- afx_msg void OnMenuitemOpenDownloadedFile();
- afx_msg void OnMenuitemRunParamter();
- afx_msg void OnMenuitemOpenDownloadedDirectory();
- afx_msg void OnMenuitemRestore();
- void OnItemclickSort(NMHDR* pNMHDR, LRESULT* pResult);
- void OnBegindrag(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);
- // afx_msg void OnMenuitemDelLink();
- // afx_msg void OnMenuitemLocateCategory();
- DECLARE_MESSAGE_MAP()
- private:
- void OnShowColumn(int iItem);
- void OnColumnSort(int iColumn);
- bool OnContextMenuRecycle(CWnd* pWnd, CPoint point);
- void DeleteSelectedItem(bool bForceDelete);
- void ShowFileDBItemText(int iItem);
- void ShowFileDBItemActive(int iItem);
- CMenuSpawn m_menuspawnPopup;
- bool m_bDeleteing;
- CImageList m_ctlImage;
- CImageList m_ctlImageDelete;
- CMonitorWnd* m_pMonitorWnd;
- CCategoryBarWnd* m_pCategoryBarWnd;
- CSetupRegister* m_pSetupRegister;
- enum eColumns{eIcon, eFileName, eCompleted, eFilesize, eTimeleft,
- eTimerunned, eDownloadrate, eUploadrate, eSeeds, eModifiedTime, eCreateTime, eAllSize};
- int m_iSortedCol;
- static int CALLBACK Compare1(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
- enum ImageState{IID_UNCOMPLETE = 0, IID_COMPLETE, IID_DOWNLOAD, IID_UPLOAD,
- IID_DOWNLOAD_TRACKER, IID_UPLOAD_TRACKER, IID_DOWNLOAD_OTHERS, IID_UPLOAD_OTHERS,
- IID_DOWNLOAD_SEED, IID_UPLOAD_SEED, IID_BAD, IID_PREPARE, IID_PAUSE, IID_DOWNLOAD_FIRE, IID_UPLOAD_FIRE};
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_FILESLISTCTRL_H__DDCB9AC9_603C_4945_9798_670F1A1DD128__INCLUDED_)