FilelistSend.h
上传用户:maryhy001
上传日期:2007-05-02
资源大小:2317k
文件大小:2k
- #ifndef _FILELIST_SEND_H
- #define _FILELIST_SEND_H
- #include <afxole.h>
- #include "..publicDropFiles.h"
- class CFileListSend : public CListView
- {
- DECLARE_DYNCREATE(CFileListSend)
- protected:
- CFileListSend();
- virtual ~CFileListSend();
- public:
- void AddFile(const char *lpszFilename, const int index = -1);
- void AddFiles(void);
- void DelFiles(void);
- void DeleteFile(const int index);
- void SelectAllItems(void);
- void SelectOneItem(const int index);
- void EnableSort(const BOOL bCanSort);
-
- BOOL IsFtpFile(const int index);
- void AddFtpFileIntoSendList(LPCSTR lpszFtpFileDi, LPCSTR lpszFtpFileName, DWORD dwFtpFilesize);
- void RemoveAllFtpFiles(void);
-
- //////////////////////////////////////////////////////////////////////////
-
- int GetMaxTransID(void);
- BOOL AddSendRecord(const int nitem, const char *tohost, const BOOL bsuccessful = TRUE);
- //////////////////////////////////////////////////////////////////////////
-
- static int CALLBACK LVCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
- public:
- BOOL m_bSendingBusy; //flag whether is in sending state.
- public:
- //{{AFX_VIRTUAL(CFileListSend)
- public:
- virtual void OnInitialUpdate();
- protected:
- virtual void OnDraw(CDC* pDC);
- virtual BOOL OnDrop(COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point);
- virtual DROPEFFECT OnDragOver(COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
- //}}AFX_VIRTUAL
- protected:
-
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- //{{AFX_MSG(CFileListSend)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
- afx_msg void OnDestroy();
- afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- private:
- COleDropTarget m_DropTarget;
- BOOL FileNamesToList( HDROP hDrop );
- BOOL DataObjectToList (COleDataObject* const pDataObject);
-
- protected:
- enum SORT_BY {FILE_NAME = 1, FILE_SIZE, FILE_SRCDIR, FILE_SNDTIME};
-
- SORT_BY m_sortedBy;
- BOOL m_bCanSort;
- CImageList m_imgView;
- };
- #endif // _FILELIST_SEND_H