?? versionpage.cpp
字號:
// Copyright (C) 1997-2002 Valeriy Ovechkin
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
#include "stdafx.h"
#include "about.h"
#include "VersionPage.h"
#include "..\resource.h"
/////////////////////////////////////////////////////////////////////////////
// CVersionPage dialog used for App About
CVersionPage::CVersionPage() : CPropertyPage(CVersionPage::IDD)
{
//{{AFX_DATA_INIT(CVersionPage)
m_strFileVerInfo = _T("");
//}}AFX_DATA_INIT
}
void CVersionPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CVersionPage)
DDX_Control(pDX, IDC_MAGIC_ICON, m_iconMagic);
DDX_Text(pDX, IDC_FILE_VER_INFO, m_strFileVerInfo);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CVersionPage, CPropertyPage)
//{{AFX_MSG_MAP(CVersionPage)
ON_BN_CLICKED(ID_MAGIC_FAQ, OnMagicFaq)
ON_BN_CLICKED(ID_MAGIC_HOMEPAGE, OnMagicHomepage)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BOOL CVersionPage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
HMODULE hMagicExe = GetModuleHandle( NULL );
if( hMagicExe )
{
HICON hMagicIcon = ::LoadIcon( hMagicExe, MAKEINTRESOURCE( IDR_MAINFRAME ) );
if( !hMagicIcon ) hMagicIcon = ::LoadIcon( NULL, IDI_WINLOGO );
m_iconMagic.SetIcon( hMagicIcon );
}
CString strTmp1, strTmp2;
strTmp1 = theApp.m_strProductName;
strTmp1 += _T(' ');
strTmp1 += theApp.m_strShortVersion;
if( theApp.m_strSpecialBuild.GetLength() )
{
strTmp1 += _T(" (");
strTmp1 += theApp.m_strSpecialBuild;
strTmp1 += _T(')');
}
strTmp1 += _T("\n\n");
strTmp1 += theApp.m_strFileDescription;
strTmp1 += _T("\n\n");
strTmp1 += theApp.m_strLegalCopyright;
strTmp1 += _T("\n\n");
strTmp1 += theApp.m_strComments;
SetDlgItemText( IDC_FILE_VER_INFO, strTmp1 );
GetDlgItemText( IDC_TEXT_MAGIC_HOMEPAGE, strTmp1 );
strTmp2.LoadString( IDS_URL_MAGIC_HOMEPAGE );
strTmp1 += strTmp2;
SetDlgItemText( IDC_TEXT_MAGIC_HOMEPAGE, strTmp1 );
GetDlgItemText( IDC_TEXT_MAGIC_FAQ, strTmp1 );
strTmp2.LoadString( IDS_URL_MAGIC_FAQ );
strTmp1 += strTmp2;
SetDlgItemText( IDC_TEXT_MAGIC_FAQ, strTmp1 );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CVersionPage::OnMagicFaq()
{
theApp.FollowLink( IDS_URL_MAGIC_FAQ );
}
void CVersionPage::OnMagicHomepage()
{
theApp.FollowLink( IDS_URL_MAGIC_HOMEPAGE );
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -