📄 renumwizcompletionpage.cpp
字号:
/************************************************************************
*
* Resource ID Organiser Core Library
*
* (c) Copyright 2000-2003 by Anna-Jayne Metcalfe (resorg@annasplace.me.uk)
* All rights reserved.
*
************************************************************************
*
* Filename : RenumWizCompletionPage.cpp
*
* Description : CRenumWizCompletionPage - Symbol Renumbering Wizard
* "Completion" page class
*
*
* Compiler : Microsoft Visual C++ 6.0, Service Pack 3 or later
* Microsoft Visual C++ .NET 2002
*
* Target
* Environment : Windows 98/NT/2000/XP
*
* 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 Anna-Jayne 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.annasplace.me.uk/resorg 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/ResOrgCore/RenumWizCompletionPage.cpp $
* $Revision: 10 $
* $Date: 15/04/03 20:38 $
* $Author: Anna $
*
* $History: RenumWizCompletionPage.cpp $
*
* ***************** Version 10 *****************
* User: Anna Date: 15/04/03 Time: 20:38
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* 1. Removed unnecessary file guards (#pragma once works well enough)
* 2. Updated file banners
*
* ***************** Version 9 *****************
* User: Anna Date: 25/11/02 Time: 15:10
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Changed website address in banner
*
* ***************** Version 8 *****************
* User: Anna Date: 22/10/02 Time: 13:24
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Changed name/mail address (at last!)
*
* ***************** Version 7 *****************
* User: Andy Date: 1/08/02 Time: 15:41
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* The "Back" button on the "Completion" page of the Symbol Renumbering
* Wizard now opens the "New Symbol Values" page, NOT the "Base Values"
* page
*
* ***************** Version 6 *****************
* User: Andy Date: 7/06/02 Time: 17:04
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Renamed the ResOrgUtils module to ResOrgCore. Updated file banners
* accordingly
*
* ***************** Version 5 *****************
* User: Andy Date: 12/28/01 Time: 12:45a
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Replaced the static text controls with a rich edit control so we can
* use bold and italic fonts
*
* ***************** 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: $
*
************************************************************************/
#include "StdAfx.h"
#include "ResOrgCore_Priv.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;
AfxInitRichEdit(); // Just in case nobody else has...
}
CRenumWizCompletionPage::~CRenumWizCompletionPage(void)
{
}
void CRenumWizCompletionPage::DoDataExchange(CDataExchange* pDX)
{
CRenumWizCompletionPage_BASE::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CRenumWizCompletionPage)
DDX_Control(pDX, IDC_RENUMWIZ_COMPLETION, m_ctrlWaffle);
//}}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_COMPLETION, 50, 50, 0, 0);
}
// Set the background colour of the rich edit control to the
// same as the dialog, so nobody realises what it really is....
m_ctrlWaffle.SetBackgroundColor(FALSE, RGB(255, 255, 255) );
m_ctrlWaffle.SetFont( GetFont() );
// Set the text
m_ctrlWaffle.SetRTF( ::LoadRtfString(IDR_RENUMWIZ_COMPLETION) );
// Hide the current selection
// Note that for this to work the control must NOT
// have the "Tab Stop" property set in the resource
// editor...this took me AGES to figure out...
m_ctrlWaffle.HideSelection(TRUE, TRUE);
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_NEW_SYM_VALUES_PAGE;
}
BOOL CRenumWizCompletionPage::OnWizardFinish(void)
{
ASSERT(NULL != m_pEngine);
if (NULL != m_pEngine)
{
// Commit the changes in the local resource symbol buffer to the main one
CWaitCursor wait;
m_pEngine->CommitChanges();
}
return TRUE; // TRUE => Close the Wizard
}
/////////////////////////////////////////////////////////////////////////////
// CRenumWizCompletionPage message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -