Click here to Skip to main content
15,895,793 members
Articles / Desktop Programming / MFC

Creating a Simple Drives Explorer Program

Rate me:
Please Sign up or sign in to vote.
4.44/5 (10 votes)
5 May 2009CPOL8 min read 95.2K   3.6K   38  
A project using the Windows Explorer Framework and some API stuff
// RightView.h : interface of the CRightView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_RIGHTVIEW_H__FAB94C21_E280_42B1_AF83_55A6814A4CBF__INCLUDED_)
#define AFX_RIGHTVIEW_H__FAB94C21_E280_42B1_AF83_55A6814A4CBF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CRightView : public CListView
{
protected: // create from serialization only
	CRightView();
	DECLARE_DYNCREATE(CRightView)

// Attributes
public:
	CFTreeBrowserDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRightView)
	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

// Implementation
public:
	CImageList m_ListImages;
	void DisplayFiles(LPTSTR Path);
	void ResetFiles();
	virtual ~CRightView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CRightView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	afx_msg void OnStyleChanged(int nStyleType, LPSTYLESTRUCT lpStyleStruct);
	DECLARE_MESSAGE_MAP()
private:
	HANDLE m_hStopEvent;
};

#ifndef _DEBUG  // debug version in RightView.cpp
inline CFTreeBrowserDoc* CRightView::GetDocument()
   { return (CFTreeBrowserDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_RIGHTVIEW_H__FAB94C21_E280_42B1_AF83_55A6814A4CBF__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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United Kingdom United Kingdom

Comments and Discussions