📄 dirlistview.h
字号:
//////////////////////////////////////////////////////////////////////
// FileFury
// Copyright (c) 2000 Tenebril Incorporated
// All rights reserved.
//
// This source code is governed by the Tenebril open source
// license (http://www.tenebril.com/developers/opensource/license.html)
//
// For more information on this and other open source applications,
// visit the Tenebril OpenSource page:
// http://www.tenebril.com/developers/opensource
//
//////////////////////////////////////////////////////////////////////
// DirListView.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CDirListView view
#include "FileInfoArray.h"
#include "FileSystem.h"
#include "Defines.h"
class CDirListView : public CView
{
friend class CChildFrame;
protected:
CListCtrl m_List;
CImageList* m_pDragImage;
BOOL m_bDragging;
int m_nDragIndex, m_nDropIndex;
HTREEITEM m_hDropItem;
CWnd* m_pDropWnd;
CPoint m_cCursorOffset;
void DropItemOnTree (CTreeCtrl* pTree);
void DropItemOnList (CListCtrl* pList);
CDirListView(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CDirListView)
// Attributes
public:
LPCTSTR GetSubPath( LPCTSTR strPath );
bool IsItemBefore(int iBase, int iCheck);
bool ShouldHighlight( int iIndex );
BOOL ExecuteFile(LPCTSTR strName);
BOOL DisplayList(LPCTSTR strPath, BOOL bForceUpdate = FALSE);
void DisplayPath(LPCTSTR strPath);
void SetViewType(int iType);
protected:
CString m_strError;
BOOL GetSysImgList();
CImageList *m_pImgList[2];
bool m_bOwnsImgList[2];
CString m_strPath;
int m_iViewType;
int m_iIconStyle;
int m_iSortType;
CFileInfoArray m_cFileArray;
CFileSystem *m_pFileSystem;
int AddItem(LPCTSTR strPath);
BOOL SortTextItems( BOOL bAscending, int low = 0, int high = -1);
void FormatColumns(int iViewType);
// Operations
public:
BOOL BrushRefresh();
void OnBeginRDrag(NMHDR *pnmhdr, LRESULT *pResult);
int GetArrangeType();
int GetViewType();
BOOL SelectEdit(LPCTSTR czFile);
CString GetMachineName();
CString GetDestination(int iIndex);
void AllowReload(BOOL bAllow);
void SetArrangeType(int iType);
int SelectedID();
LPCTSTR GetFilePath(int iIndex);
LPCTSTR GetCurrentDirectory( );
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDirListView)
protected:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
//}}AFX_VIRTUAL
void OnItemDblClk(NMHDR *pMessageHeader, LRESULT *pResult);
// Implementation
protected:
virtual ~CDirListView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
protected:
BOOL m_bUpdateContinue;
BOOL StopUpdateIcons(BOOL bWait);
BOOL UpdateIcons();
static UINT PASCAL UpdateIcons_Thread(LPVOID *Param);
BOOL DownloadFile(LPCTSTR czName);
BOOL m_bHasFormattedColumns;
BOOL m_bDragShowMenu;
//{{AFX_MSG(CDirListView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
//}}AFX_MSG
afx_msg void OnBeginDrag (NMHDR* pnmhdr, LRESULT* pResult);
afx_msg void OnEndLabelEdit(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnRClick(NMHDR *pMessageHeader, LRESULT *pResult);
afx_msg void OnKeyDown(NMHDR* pNMHDR, LRESULT* pResult);
DECLARE_MESSAGE_MAP()
private:
BOOL m_bAllowReload;
};
/////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -