2__INCLUDED_)
#define AFX_LEFTVIEW_H__29F66875_4E46_11D6_9693_B383368EF622__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CDriveExplorerDoc;
class CLeftView : public CTreeView
{
protected: // create from serialization only
CLeftView();
DECLARE_DYNCREATE(CLeftView)
// Attributes
public:
CDriveExplorerDoc* GetDocument();
CImageList* m_pImageList;
CString m_LocalPath;
// Operations
public:
BOOL HasSubdirectory(CString &strPathName);
BOOL IsDriveNode(HTREEITEM hItem);
void SetButtonState(HTREEITEM hItem, CString &strPathName);
UINT AddDirectoryNodes(HTREEITEM hItem, CString &strPathName);
BOOL IsMediaValid(CString &strPathName);
HTREEITEM GetDriveNode(HTREEITEM hItem);
UINT DeleteChildren(HTREEITEM hItem);
BOOL IsPathValid(CString &strPathName);
CString GetPathFromItem(HTREEITEM hItem);
void AddDummyNode(HTREEITEM hItem);
void InitTreeView(HTREEITEM hParent);
BOOL AddDrives(CString strDrive, HTREEITEM hParent);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLeftView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnInitialUpdate(); // called first time after construct
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CLeftView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CLeftView)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
afx_msg void OnDestroy();
afx_msg void OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSelchanging(NMHDR* pNMHDR, LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in LeftView.cpp
inline CDriveExplorerDoc* CLeftView::GetDocument()
{ return (CDriveExplorerDoc*)m_pDocument; }
#endif
#endif
////////////////////////////////////////////////////////// CLeftView
#include "stdafx.h"
#include "DriveExplorer.h"
#include "DriveExplorerDoc.h"
#include "LeftView.h"
#include "DriveExplorerView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE = __FILE__;
#endif
#define ILI_CDDRV 0
#define ILI_CLSDFLD 1
#define ILI_DRIVE 2
#define ILI_FLOPPYDRV 3
#define ILI_MYCOMP 4
#define ILI_OPENFLD 5
#define ILI_TEXTFILE 6
#define MYCOMPUTER "My Computer"
IMPLEMENT_DYNCREATE(CLeftView, CTreeView)
BEGIN_MESSAGE_MAP(CLeftView, CTreeView)
//{{AFX_MSG_MAP(CLeftView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
ON_WM_DESTROY()
ON_NOTIFY_REFLECT(TVN_ITEMEXPA