📄 scemfoptgenpane.cpp
字号:
/*
* This file is part of the EMFexplorer projet.
* Copyright (C) 2004 Smith Charles.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*
* Extension: for commercial use, apply the Equity Public License, which
* adds to the normal terms of the GLPL a condition of donation to the author.
* If you are interested in support for this source code,
* contact Smith Charles <smith.charles@free.fr> for more information.
*/
#include "stdafx.h"
#include "emfexplorer.h"
#include "SCEMFOptGenPane.h"
#include "EMFexplorerView.h"
#include "EMFexplorerReg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSCEMFOptGenPane propertypage
CSCEMFOptGenPane::CSCEMFOptGenPane() : CPropertyPage(CSCEMFOptGenPane::IDD)
{
//{{AFX_DATA_INIT(CSCEMFOptGenPane)
m_iDocLoadSettings = (int)SCE_DLSettingsDefault;
m_iDocSaveSettings = (int)SCE_DSSettingsWysiwyg;
//}}AFX_DATA_INIT
}
void CSCEMFOptGenPane::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSCEMFOptGenPane)
DDX_Radio(pDX, IDC_RADIO_OPTGEN_USEDFLT, m_iDocLoadSettings);
DDX_Radio(pDX, IDC_RADIO_OPTGEN_SAVECONVERTED, m_iDocSaveSettings);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSCEMFOptGenPane, CPropertyPage)
//{{AFX_MSG_MAP(CSCEMFOptGenPane)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSCEMFOptGenPane message handlers
void CSCEMFOptGenPane::SCLoadSettings()
{
CWinApp* pApp = AfxGetApp();
m_iDocLoadSettings = pApp->GetProfileInt(s_szAppSection, SC_EMFREG_ON_DOCLOAD, (int)m_iDocLoadSettings);
m_iDocSaveSettings = pApp->GetProfileInt(s_szAppSection, SC_EMFREG_ON_DOCSAVE, (int)m_iDocSaveSettings);
UpdateData(FALSE);
}
BOOL CSCEMFOptGenPane::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// Extra initialization here
SCLoadSettings();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CSCEMFOptGenPane::OnOK()
{
CWinApp* pApp = AfxGetApp();
pApp->WriteProfileInt(s_szAppSection, SC_EMFREG_ON_DOCLOAD, m_iDocLoadSettings);
pApp->WriteProfileInt(s_szAppSection, SC_EMFREG_ON_DOCSAVE, m_iDocSaveSettings);
CPropertyPage::OnOK();
}
BOOL CSCEMFOptGenPane::OnSetActive()
{
BOOL bOk = CPropertyPage::OnSetActive();
CWnd* pParent = GetParent();
ASSERT(pParent);
NMHDR nmhdr;
nmhdr.code = PSN_SETACTIVE;
nmhdr.hwndFrom = m_hWnd;
nmhdr.idFrom = -1/*eSettingsBadID*/; //GetDlgCtrlID();
pParent->SendMessage(WM_NOTIFY, (WPARAM)nmhdr.idFrom, (LPARAM)&nmhdr);
return bOk;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -