Click here to Skip to main content
15,879,474 members
Articles / Desktop Programming / MFC

Easy Installer

Rate me:
Please Sign up or sign in to vote.
4.81/5 (57 votes)
14 Sep 2006CPOL11 min read 276.4K   3.7K   155  
The Easy Installer program
// SetupPage.cpp : implementation file
//

#include "stdafx.h"
#include "InfoPage.h"
#include "NewWizDialog.h"
#include "unwrap.h"

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

/////////////////////////////////////////////////////////////////////////////
// CInfoPage dialog


CInfoPage::CInfoPage(CWnd* pParent /*=NULL*/)
	: CNewWizPage(CInfoPage::IDD, pParent)
{
	//{{AFX_DATA_INIT(CInfoPage)
	m_strInfo = _T("");
	//}}AFX_DATA_INIT
}


void CInfoPage::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CInfoPage)
	DDX_Control(pDX, ST_CAPTION, m_CaptionCtrl);
	DDX_Text(pDX, IDC_EDIT1, m_strInfo);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CInfoPage, CNewWizPage)
	//{{AFX_MSG_MAP(CInfoPage)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CInfoPage message handlers

BOOL CInfoPage::OnInitDialog() 
{
	m_strInfo = unwrap.GetInfo();	//"The new version of <product> is guaranteed to crash every other day.";
	CNewWizPage::OnInitDialog();
	m_CaptionCtrl.SetFont(&m_LargeFont, TRUE);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CInfoPage::OnSetActive()
{
//	m_pParent->SetTitle("This is the setup wizard");
}

BOOL CInfoPage::OnKillActive()
{
//	m_pParent->SetTitle("Setup Kill Active has been called");
	return TRUE;
}

LRESULT CInfoPage::OnWizardBack()
{
	CString license = unwrap.GetAgreement();
	if(license.IsEmpty())
		return IDW_INTRO;
	return IDW_AGREEMENT;
}

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
Israel Israel
lichen farmer, semi-lingual, never saw a Sylvester Stallone movie

Comments and Discussions