FileListRecv.h
上传用户:maryhy001
上传日期:2007-05-02
资源大小:2317k
文件大小:3k
- #ifndef _FILELIST_RECV_H
- #define _FILELIST_RECV_H
- #include <afxole.h>
- #include "..publicDropFiles.h"
- #include "guiadodb.h"
- class CFileListRecv : public CListView
- {
- DECLARE_DYNCREATE(CFileListRecv)
- public:
- CFileListRecv();
- virtual ~CFileListRecv();
- public:
- void SelectAllItems();
- void CleanupSelectedItems();
- void EnableSort(const BOOL bCanSort);
- int AddFile(LPNETFILEHDR lpfilehdr);
- void AddHistoryFromRS(CGuiRecordSet &rs);
- BOOL AddRecvRecord(const int nitem, const BOOL bsuccessful = TRUE);
- static int CALLBACK LVCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
- public:
- int m_nRecvRefCnt; //标识当前有多少客户端向此Agent发送文件(引用计数)
- public:
- //{{AFX_VIRTUAL(CFileListRecv)
- public:
- virtual void OnInitialUpdate();
- virtual DROPEFFECT OnDragOver(COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
- protected:
- virtual void OnDraw(CDC* pDC);
- //}}AFX_VIRTUAL
- protected:
-
- //modify file name or move file into another directory.
- BOOL ModifyFileNameFromIndex(const int nitem, const char *psnewname);
- //delete file link from database.
- BOOL DeleteFileLinkFromIndex(const int nitem);
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- //{{AFX_MSG(CFileListRecv)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnDestroy();
- afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
- afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnBeginDrag(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
- //}}AFX_MSG
- afx_msg void OnFileOperForOpen(); //ID_FLEOPER_OPEN
- afx_msg void OnFileOperForCopy(); //ID_FLEOPER_COPY
- afx_msg void OnFileOperForMove(); //ID_FLEOPER_MOVEFILE
- afx_msg void OnFileOperForRename(); //ID_FLEOPER_RENAME
- afx_msg void OnFileOperForDelete(); //ID_FLEOPER_DELFILE
- afx_msg void OnFileOperForDelLink(); //ID_FLEOPER_DELLINK
- afx_msg void OnFileOperForViewProp(); //ID_FLEOPER_VIEWFLEPROP
- afx_msg void OnFileOperForViewDestDir(); //ID_FLEOPER_TODESTDIR
- afx_msg void OnFileOperForResendFiles(); //ID_FLEOPER_RESENDFLE
- DECLARE_MESSAGE_MAP()
- private:
- COleDropTarget m_DropTarget;
- BOOL PrepareFileBuff(CDropFiles& DropFiles) const;
- protected:
- enum SORT_BY {FILE_NAME = 1, FILE_SIZE, FILE_LEFTSIZE, FILE_SRCADDR, FILE_SRCDIR, FILE_DESTDIR, FILE_RECVTIME};
-
- CMenu m_popmenu;
- SORT_BY m_sortedBy;
- BOOL m_bCanSort;
- CImageList m_imgView;
- };
- #endif //_FILELIST_RECV_H