DirListCtrl.h
资源名称:FTP总集.rar [点击查看]
上传用户:tjfeida
上传日期:2013-03-10
资源大小:1917k
文件大小:3k
源码类别:
Ftp客户端
开发平台:
Visual C++
- #if !defined(AFX_DIRLISTCTRL_H__C0862B27_4E98_47A5_9643_346A40677C2F__INCLUDED_)
- #define AFX_DIRLISTCTRL_H__C0862B27_4E98_47A5_9643_346A40677C2F__INCLUDED_
- /*********************************************
- **该文件是属于WolfFTP工程中的。如果有什么问题
- **请联系
- ** tablejiang@21cn.com
- **或者访问
- ** http://wolfftp.51.net
- **以得到最新的支持。
- *********************************************/
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // DirListCtrl.h : header file
- //
- #include "share.h"
- #include "FileManageLib.h"
- /***********************************************************
- ** @Description:
- ** Use this ctrl you can display all item in a directory
- ** and use system default icon .Just like Windows
- ** File Explorer.
- **
- ** @Note:
- ** You can use DisplayPath( ) function to display a path item .
- ** can use GetNowListPath( ) function to get now path .
- ** can use UpDirectory( ) to enter the parent directory .
- ** can use GetNowSelectPath( ) to get the select path .
- **
- **
- ** @Author: Table.JHM.太子
- ** e-mail: tablejiang@21cn.com
- ** Date: 2001 3 26
- *************************************************************/
- /////////////////////////////////////////////////////////////////////////////
- // CDirListCtrl window
- class CDirListCtrl : public CListCtrl
- {
- // DECLARE_SERIAL( CDirListCtrl )
- // Construction
- public:
- CDirListCtrl();
- virtual ~CDirListCtrl();
- // Attributes
- public:
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CDirListCtrl)
- public:
- //}}AFX_VIRTUAL
- // Implementation
- // Generated message map functions
- protected:
- //{{AFX_MSG(CDirListCtrl)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
- afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnDestroy();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- protected:
- BOOL EnterSubDirectory( );
- CString GetFatherDirectory( LPCTSTR szPath );
- BOOL GetSysImageList( );
- LPCTSTR GetDisplayString( LPCTSTR strPath );
- BOOL InitList( );
- BOOL AddItem( LPCTSTR strPath );
- CImageList m_DirImageList ; //the system image list .
- DWORD m_dwItemNum ; //item number .
- CString m_NowListPath ; //use to store now list path .
- /**************************************************
- ** Interface function **
- **************************************************/
- public:
- BOOL MoveSelectFile( LPCTSTR szDesPath );
- BOOL RenameSelectItem( );
- BOOL DeleteSelectItem( );
- void SetParentWnd( HWND hWnd );
- CString GetNowSelectPath( );
- CString GetNowListPath( );
- BOOL UpDirectory( );
- BOOL DisplayPath( LPCTSTR strPath );
- BOOL SelectAllItem( );
- public:
- HWND m_hParentWnd ;
- CFileManageLib m_FileMan ; //file manage class
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_DIRLISTCTRL_H__C0862B27_4E98_47A5_9643_346A40677C2F__INCLUDED_)