Click here to Skip to main content
15,894,539 members
Articles / Desktop Programming / MFC

Menu, tabs, toolbars, scrollbars, hotkeys, frames resizing, and the ON_COMMAND_RANGE handler for classes derived from CListCtrl on CFormView dialogs

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
12 Jul 2009CPOL3 min read 41.7K   1.9K   25  
A demonstration of using a general-purpose MDI interface in MFC table forms.
/////////////////////////////////////////////////////////////////////////////
// MainView.h : interface of the CMainView class
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINVIEW_H__EMERY_EMERALD__INCLUDED_)
	#define AFX_MAINVIEW_H__EMERY_EMERALD__INCLUDED_

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

	#include "ListCtrlEx\ListCtrlEx.h"
	#include "ListCtrlEx\HeaderCtrlEx.h"

	/////////////////////////////////////////////////////////////////////////////
	// Class CMainView
	/////////////////////////////////////////////////////////////////////////////
	class CMainView : public CFormView {
		DECLARE_DYNCREATE(CMainView)

		protected:  // Create from serialization only
			CMainView();

		public:
			//*** Main application pointer
			CMainApp *m_pMainApp;

			//*** Table Id
			ETABLE m_eTable;

			//*** The meta table structure
			META_TABLE m_MetaTable;

		public:
			//{{AFX_DATA(CMainView)
			enum{ IDD = IDD_MAIN_FORM };
				// NOTE: the ClassWizard will add data members here
			//}}AFX_DATA
		
		// Attributes
		public:
			//CMainDoc *GetDocument();

		// Operations
		public:

		// Overrides
		// ClassWizard generated virtual function overrides
		//{{AFX_VIRTUAL(CMainView)
		public:
			//virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
		
		protected:
			//virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
			virtual void OnInitialUpdate();  // Called first time after construct
		//}}AFX_VIRTUAL

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

		// Generated message map functions
		protected:
			//{{AFX_MSG(CMainView)
			afx_msg int OnCreate(LPCREATESTRUCT pCS);
			//}}AFX_MSG

		DECLARE_MESSAGE_MAP()
	};  // class CMainView : public CFormView
	/*
	#ifndef _DEBUG  // debug version in MainView.cpp
		inline CMainDoc* CMainView::GetDocument()
			 {return (CMainDoc *) m_pDocument;}
	#endif
	*/
	//{{AFX_INSERT_LOCATION}}
	// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAINVIEW_H__EMERY_EMERALD__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
Software Developer
Ukraine Ukraine
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions