📄 renumwizcompletionpage.cpp
字号:
/************************************************************************
*
* Resource ID Organiser Utility Library
*
* (c) Copyright 2000-2001 by Andy Metcalfe (andy.metcalfe@lineone.net)
* All rights reserved.
*
************************************************************************
*
* Filename : RenumWizCompletionPage.cpp
*
* Description : CRenumWizCompletionPage - Symbol Renumbering Wizard
* "Completion" page class
*
*
* Compiler : Microsoft Visual C++ 6.0, Service Pack 3 or 4
*
* Target
* Environment : Windows 98/NT
*
* NOTE:
*
* This software is provided "as is" free for personal use. All
* title and copyrights in and to the software, including but not
* limited to any images, text, etc. incorporated into it, are
* owned by Andy Metcalfe, except where acknowledged otherwise.
*
* Your may freely to use this code in your own products, PROVIDED
* this notice is not removed or modified.
*
*
* Visit http://www.resorg.co.uk for latest updates
*
************************************************************************
*
* MODIFICATION HISTORY:
*
* This is a controlled document. See project configuration
* control tool for latest version and full version history.
*
* $Archive: /Projects/AddIns/ResOrg/ResOrgUtils/RenumWizCompletionPage.cpp $
* $Revision: 4 $
* $Date: 4/05/01 22:37 $
* $Author: Andy $
*
* $History: RenumWizCompletionPage.cpp $
*
* ***************** Version 4 *****************
* User: Andy Date: 4/05/01 Time: 22:37
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Implemented resizing
*
* ***************** Version 3 *****************
* User: Andy Date: 21/04/01 Time: 7:23
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Integrated CRenumWizEngine
*
* ***************** Version 2 *****************
* User: Andy Date: 29/11/00 Time: 18:37
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added file banners
*
* $Nokeywords: $
*
************************************************************************/
// RenumWizCompletionPage.cpp : implementation file
//
#include "StdAfx.h"
#include "ResOrgUtils_Res.h"
#include "RenumWizCompletionPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CRenumWizCompletionPage property page
IMPLEMENT_DYNCREATE(CRenumWizCompletionPage, CRenumWizCompletionPage_BASE)
CRenumWizCompletionPage::CRenumWizCompletionPage(void) : CRenumWizCompletionPage_BASE(CRenumWizCompletionPage::IDD, IDS_RENUMWIZ)
{
//{{AFX_DATA_INIT(CRenumWizCompletionPage)
//}}AFX_DATA_INIT
// Don't show the header bitmap on the last page
m_psp.dwFlags |= PSP_HIDEHEADER;
}
CRenumWizCompletionPage::~CRenumWizCompletionPage(void)
{
}
void CRenumWizCompletionPage::DoDataExchange(CDataExchange* pDX)
{
CRenumWizCompletionPage_BASE::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CRenumWizCompletionPage)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CRenumWizCompletionPage, CRenumWizCompletionPage_BASE)
//{{AFX_MSG_MAP(CRenumWizCompletionPage)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CRenumWizCompletionPage overrides
BOOL CRenumWizCompletionPage::OnInitDialog(void)
{
CRenumWizCompletionPage_BASE::OnInitDialog();
if (IsResizeable())
{
m_Resizer.Add( IDC_RENUMWIZ_INTRO, 50, 50, 0, 0);
m_Resizer.Add( IDC_RENUMWIZ_COMPLETION, 50, 50, 0, 0);
m_Resizer.Add( IDC_RENUMWIZ_COMPLETION_2, 50, 50, 0, 0);
m_Resizer.Add( IDC_RENUMWIZ_COMPLETION_3, 50, 50, 0, 0);
}
// Set the font for the introductory text
// The Wizard97 Specification specifies a 12 point
// bold Verdana font, hence the following code
//
// TO DO: get the font name and size from the string table
//
// Refer to the article "Creating Wizards" in the User Interface Services
// section of the Win32 SDK documentation for further information
CWnd* pWnd = GetDlgItem(IDC_RENUMWIZ_INTRO);
if (pWnd != NULL)
{
HDC hDC = ::GetDC(NULL);
int nFontSize = 12;
LONG nHeight = 0 - ::GetDeviceCaps(hDC, LOGPIXELSY) * nFontSize / 72;
::ReleaseDC(NULL, hDC);
m_fontTitle.SetFaceName( _T("Verdana Bold") );
m_fontTitle.SetBold(TRUE);
m_fontTitle.SetHeight(nHeight);
pWnd->SetFont(&m_fontTitle);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
// Override to disable the "Next" button, and enable the "Finish"
// button (this is the last page)
//
// Also sets the displayed text
BOOL CRenumWizCompletionPage::OnSetActive(void)
{
if (!IsInitialising())
{
EnableWizardButtons(PSWIZB_NEXT, FALSE);
CNGWizard* pWizard = GetParent();
ASSERT(NULL != pWizard);
{
// Hide the "Next" button, and replace it with "Finish"
pWizard->SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);
}
EnableWizardButtons(PSWIZB_FINISH, TRUE);
}
return CRenumWizCompletionPage_BASE::OnSetActive();
}
BOOL CRenumWizCompletionPage::OnKillActive(void)
{
if (!IsInitialising())
{
EnableWizardButtons(PSWIZB_FINISH, FALSE);
CNGWizard* pWizard = GetParent();
ASSERT(NULL != pWizard);
if (NULL != pWizard)
{
// Hide the "Finish" button, and replace it with "Next"
pWizard->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);
}
EnableWizardButtons(PSWIZB_NEXT, TRUE);
}
return CRenumWizCompletionPage_BASE::OnKillActive();
}
// Override to re-enable the "Next" button before we go back to the previous page
LRESULT CRenumWizCompletionPage::OnWizardBack(void)
{
return IDD_RENUMWIZ_BASE_VALUES_PAGE;
}
BOOL CRenumWizCompletionPage::OnWizardFinish(void)
{
if (NULL != m_pEngine)
{
m_pEngine->Renumber();
}
return TRUE; // TRUE => Close the Wizard
}
/////////////////////////////////////////////////////////////////////////////
// CRenumWizCompletionPage message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -