Click here to Skip to main content
15,886,110 members
Articles / Desktop Programming / MFC

Programming Toolbar Chevrons

Rate me:
Please Sign up or sign in to vote.
4.87/5 (18 votes)
8 May 2003 421.9K   6.4K   150  
An introduction to using the cool new toolbar chevrons
#include "stdafx.h"
#include "Chev.h"

#include "MainFrm.h"
#include "ChevDoc.h"
#include "ChevView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CChevApp

BEGIN_MESSAGE_MAP(CChevApp, CWinApp)
	//{{AFX_MSG_MAP(CChevApp)
	//}}AFX_MSG_MAP
	ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
	ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
CChevApp::CChevApp()
{
}

/////////////////////////////////////////////////////////////////////////////
CChevApp theApp;

/////////////////////////////////////////////////////////////////////////////
BOOL CChevApp::InitInstance()
{
#ifdef _AFXDLL
	Enable3dControls();
#else
	Enable3dControlsStatic();
#endif

	SetRegistryKey(_T("Local AppWizard-Generated Applications"));

	LoadStdProfileSettings();

	CSingleDocTemplate* pDocTemplate;
	pDocTemplate = new CSingleDocTemplate(
		IDR_MAINFRAME,
		RUNTIME_CLASS(CChevDoc),
		RUNTIME_CLASS(CMainFrame),
		RUNTIME_CLASS(CChevView));
	AddDocTemplate(pDocTemplate);

	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	if (!ProcessShellCommand(cmdInfo))
		return FALSE;

	m_pMainWnd->ShowWindow(SW_SHOW);
	m_pMainWnd->UpdateWindow();

	return TRUE;
}

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

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions