SubFilesWnd.h
资源名称:GGBT.rar [点击查看]
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:3k
源码类别:
P2P编程
开发平台:
Visual C++
- #if !defined(AFX_SUBFILESWND_H__3B58F671_832A_47C8_9E8D_3F11B9A2DFCF__INCLUDED_)
- #define AFX_SUBFILESWND_H__3B58F671_832A_47C8_9E8D_3F11B9A2DFCF__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // SubFilesWnd.h : header file
- //
- #include "ctrlext.h"
- class CFileTorrent;
- class CCategoryBarWnd;
- class CFileDBItem;
- class CMonitorWnd;
- /////////////////////////////////////////////////////////////////////////////
- // CSubFilesWnd window
- class CSubFilesWnd : public CTreeCtrlEx
- {
- // Construction
- public:
- CSubFilesWnd();
- // Attributes
- public:
- void GetChecks();
- vector<CSize> m_vChecks;
- // Operations
- public:
- BOOL CreateEx(CWnd *pParent, CRect &rc, long lParam, bool bMonitor, CMonitorWnd* pMonitorWnd);
- void SetCateGoryBarWnd(CCategoryBarWnd* pCategoryBarWnd);
- // void Monitor(CFileDBItem* pFileDBItem);
- void Monitor(string strTorrentFileName = string(), string strFileName = string(), CFileDBItem* pFileDBItem = 0);
- void Monitor(CFileTorrent* pFileTorrent, string strFileName = string(), CFileDBItem* pFileDBItem = 0);
- void Init();
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CSubFilesWnd)
- //}}AFX_VIRTUAL
- // Implementation
- public:
- void ShowSubFiles();
- void LoadSubFiles();
- virtual ~CSubFilesWnd();
- // Generated message map functions
- protected:
- //{{AFX_MSG(CSubFilesWnd)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
- afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
- //}}AFX_MSG
- void OnMenuStartFile(UINT nID);
- void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);
- void OnRightClick(NMHDR *pNotifyStruct,LRESULT *result);
- afx_msg void OnOpenDirectory();
- afx_msg void OnLoadSubfilesCompleted(long lParam, long wParam);
- afx_msg void CSubFilesWnd::OnMenuitemMonitorSub(UINT uID);
- DECLARE_MESSAGE_MAP()
- private:
- static DWORD WINAPI ShowSubFilesProc(void *pParam);
- void Stop();
- CTreeCursor AddItem(CString strItem, CTreeCursor curLayer, int iInx, bool bDir, bool bSizeZero);
- int GetIconIndex(char *filename, BOOL bDirectory = false);
- CMonitorWnd* m_pMonitorWnd;
- CFileDBItem* m_pFileDBItem;
- CCategoryBarWnd* m_pCategoryBarWnd;
- CFileTorrent* m_pFileTorrent;
- bool m_bMonitor;
- string m_strFileName;
- string m_strTorrentFileName;
- CImageList m_ctlImage;
- CTreeCursor m_ItemSel;
- HANDLE m_hCancel;
- HANDLE m_hFileOpenDone;
- enum {eNormal, eSizeZero};
- //////////////////////////////////////////////////////////
- // switch download and delete mode.
- bool TravelThrough(HTREEITEM hItem);
- void SetItemCheck(CTreeCursor curItem, BOOL bCheck);
- void TravelChild(HTREEITEM hItem, BOOL bCheck);
- void TravelSiblingAndParent(HTREEITEM hItem);
- void GetChecksChild(HTREEITEM hItem, BOOL bDelete);
- long m_lCount;
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_SUBFILESWND_H__3B58F671_832A_47C8_9E8D_3F11B9A2DFCF__INCLUDED_)