?? dirtreeview.h
字號:
// DirTreeView.h : interface of the CDirTreeView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_DIRTREEVIEW_H__DB685468_4F32_11D4_85C6_00A0CC253EAC__INCLUDED_)
#define AFX_DIRTREEVIEW_H__DB685468_4F32_11D4_85C6_00A0CC253EAC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CDirTreeView : public CTreeView
{
protected: // create from serialization only
CDirTreeView();
DECLARE_DYNCREATE(CDirTreeView)
// Attributes
public:
CDirTreeDoc* GetDocument();
public:
enum TreeModes
{
tmShort = 0,
tmDetail,
tmExpanded
};
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDirTreeView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
public:
void SetDirectoryName (CString& dir, bool Display = false);
private:
void DeleteNode (CString& NodeName);
void RefreshSelection();
void BuildPath(CString& path, HTREEITEM node);
void SelectStartDir(char * StartDir);
HTREEITEM InsertChild (HTREEITEM parent, char *label, int image, int selimage, HTREEITEM SortType);
void AddNode (const char * path, HTREEITEM node, int type, int mode);
void LoadTree();
void InitializeTree();
int GetIconIndex (WIN32_FIND_DATA fd);
// Implementation
public:
virtual ~CDirTreeView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
CString & GetCurrentDirectory();
BOOL LoadSystemImageList (UINT uiImageList);
//{{AFX_MSG(CDirTreeView)
afx_msg void OnDestroy();
afx_msg void OnItemexpanded(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
CImageList m_Images;
int m_nLevel;
CString m_StartPath;
};
#ifndef _DEBUG // debug version in DirTreeView.cpp
inline CDirTreeDoc* CDirTreeView::GetDocument()
{ return (CDirTreeDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DIRTREEVIEW_H__DB685468_4F32_11D4_85C6_00A0CC253EAC__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -