|
// DiskUseView.h : interface of the CDiskUseView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_DISKUSEVIEW_H__3CF3CFA2_1B81_4502_9956_CCFACB27DF60__INCLUDED_)
#define AFX_DISKUSEVIEW_H__3CF3CFA2_1B81_4502_9956_CCFACB27DF60__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define MAX_LEVELS 256
class CDiskUseView : public CTreeView
{
protected: // create from serialization only
CDiskUseView();
DECLARE_DYNCREATE(CDiskUseView)
// Attributes
public:
CDiskUseDoc* GetDocument();
// Operations
public:
// these are the outwardly visible operations:
// scan the directory and display the use tree
unsigned __int64 DoScan(const char *pszPath);
// expand the tree to the spec'd number of levels
void ExpandTree(int nLevels);
// copy a text representation of the tree to a string or a file
void DisplayTree(CString *pCs, FILE *fp);
// copy the path to the selected tree node
void GetTreeNodePath(CString *pCs);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDiskUseView)
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
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CDiskUseView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
unsigned __int64 ScanDirectory(HTREEITEM hDir, const char *pszPath);
void DisplaySubtree(HTREEITEM hItem, int nLevel, CString *pCs, FILE *fp);
void ExpandTreeLevel(HTREEITEM hLevel, int nLevel);
CString m_csPathRoot;
bool m_bMoreThisLevel[MAX_LEVELS];
// Generated message map functions
protected:
//{{AFX_MSG(CDiskUseView)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in DiskUseView.cpp
inline CDiskUseDoc* CDiskUseView::GetDocument()
{ return (CDiskUseDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DISKUSEVIEW_H__3CF3CFA2_1B81_4502_9956_CCFACB27DF60__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Electrical engineer turned software engineer, now active in high-speed fiber-optic communications after a long career in automated test equipment development and sonar system development. Enjoy partitioning hardware/software systems into logical, coherent structures. Incorrigible builder of tools.