Click here to Skip to main content
15,891,253 members
Articles / Desktop Programming / MFC

Reusable base class for SplitterWnd

Rate me:
Please Sign up or sign in to vote.
4.93/5 (77 votes)
2 Sep 2001CPOL3 min read 366.5K   11.6K   136  
A class derived from CSplitterWnd which makes splitting and switching of views simple.
#if !defined(AFX_SPLITTERWNDTESTVIEW4_H__34530DDC_D294_488E_AEC4_484C11808C96__INCLUDED_)
#define AFX_SPLITTERWNDTESTVIEW4_H__34530DDC_D294_488E_AEC4_484C11808C96__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SplitterWndTestView4.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CSplitterWndTestView4 view

class CSplitterWndTestView4 : public CView
{
protected:
	CSplitterWndTestView4();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CSplitterWndTestView4)

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSplitterWndTestView4)
	protected:
	virtual void OnDraw(CDC* pDC);      // overridden to draw this view
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CSplitterWndTestView4();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
protected:
	//{{AFX_MSG(CSplitterWndTestView4)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_SPLITTERWNDTESTVIEW4_H__34530DDC_D294_488E_AEC4_484C11808C96__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
Chief Technology Officer
Switzerland Switzerland
Professional IT developer since 1983. First projects with Cobol, then Pascal, Modula2, C and since Visual C++ 1.0 also with C++ and today C#. Works since 1986 as Consultant, between 1990 and 2008 for Infobrain in Switzerland, from 2008 until 2013 for enValue (also Switzerland) and currently working for Comfone (Bern, Switzerland).

Married, two grown-up daughters, Hobbies : Paragliding, Orienteering, Mountainbiking, Photography

Comments and Discussions