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

Professional User Interface Suite

Rate me:
Please Sign up or sign in to vote.
4.99/5 (174 votes)
13 Jan 200423 min read 1.5M   23.6K   641  
MFC extension library enabling software to be provided with a professional UI
// ResizablePropertySheet.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "ResizablePropertySheet.h"
#include "MyResizablePage1.h"
#include "MyResizablePage2.h"
#include "MyResizablePage3.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyApp

BEGIN_MESSAGE_MAP(CMyApp, CWinApp)
	//{{AFX_MSG_MAP(CMyApp)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG
	ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyApp construction

CMyApp::CMyApp()
{
	// TODO: add construction code here,
	// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CMyApp object

CMyApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CMyApp initialization

BOOL CMyApp::InitInstance()
{
	SetRegistryKey(
		_T("Foss") // your company name
		);

	// comment this line to leave default UI style
	g_PaintManager.InstallPaintManager( new CExtPaintManager );

CExtResizablePropertySheet
		_PropSheet(
			AFX_IDS_APP_TITLE // your software name
			);

	// add pages
CMyResizablePage1 _page1;
	_PropSheet.AddPage( &_page1 );
CMyResizablePage2 _page2;
	_PropSheet.AddPage( &_page2 );
CMyResizablePage3 _page3;
	_PropSheet.AddPage( &_page3 );

	// enable persistent window position
	_PropSheet.EnableSaveRestore(
		_T( "Dialog Settings" ),
		_T( "Main Property Sheet" )
		);

	// uncomment to set wizard like look
	//_PropSheet.SetWizardMode();

	// run it
	if( _PropSheet.DoModal() == IDOK )
	{
		//AfxMessageBox( _T("<OK> pressed") );
	}
	else
	{
		//AfxMessageBox( _T("<Cancel> pressed") );
	}

	// Since the dialog has been closed, return FALSE so that we exit the
	//  application, rather than start the application's message pump.
	return FALSE;
}

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
Architect Foss Software Inc
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