|
// PrPgeSpellOptions_General.cpp : implementation file
//
#include "stdafx.h"
#include "FPSSpellChecker.h"
#include "PrPgeSpellOptions_General.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPrPgeSpellOptions_General property page
IMPLEMENT_DYNCREATE(CPrPgeSpellOptions_General, CPropertyPage)
CPrPgeSpellOptions_General::CPrPgeSpellOptions_General() : CPropertyPage(CPrPgeSpellOptions_General::IDD)
{
//{{AFX_DATA_INIT(CPrPgeSpellOptions_General)
m_bCheckWhileTyping = FALSE;
m_strCommonDic = _T("");
m_strMainDic = _T("");
m_strUserDic = _T("");
m_bIgnoreAddresses = FALSE;
m_bIgnoreNumbers = FALSE;
m_bIgnoreUpperCase = FALSE;
//}}AFX_DATA_INIT
}
CPrPgeSpellOptions_General::~CPrPgeSpellOptions_General()
{
}
void CPrPgeSpellOptions_General::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPrPgeSpellOptions_General)
DDX_Control(pDX, IDC_LANGUAGE, m_cboLanguage);
DDX_Check(pDX, IDC_CHECK_INLINE, m_bCheckWhileTyping);
DDX_Text(pDX, IDC_DIC_COMMON, m_strCommonDic);
DDX_Text(pDX, IDC_DIC_MAIN, m_strMainDic);
DDX_Text(pDX, IDC_DIC_USER, m_strUserDic);
DDX_Check(pDX, IDC_IGNORE_FILES, m_bIgnoreAddresses);
DDX_Check(pDX, IDC_IGNORE_NUMBERS, m_bIgnoreNumbers);
DDX_Check(pDX, IDC_IGNORE_UPPERCASE, m_bIgnoreUpperCase);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPrPgeSpellOptions_General, CPropertyPage)
//{{AFX_MSG_MAP(CPrPgeSpellOptions_General)
ON_BN_CLICKED(IDC_COMMON_BROWSE, OnCommonBrowse)
ON_BN_CLICKED(IDC_MAIN_BROWSE, OnMainBrowse)
ON_BN_CLICKED(IDC_USER_BROWSE, OnUserBrowse)
ON_CBN_SELCHANGE(IDC_LANGUAGE, OnSelchangeLanguage)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPrPgeSpellOptions_General message handlers
void CPrPgeSpellOptions_General::OnCommonBrowse()
{
UpdateData();
CFileDialog dlg(TRUE,
"dic",
m_strCommonDic,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"Dictionary files (*.dic)|*.dic|");
if (dlg.DoModal() == IDOK)
{
m_strCommonDic = dlg.GetPathName();
UpdateData(FALSE);
}
}
void CPrPgeSpellOptions_General::OnMainBrowse()
{
UpdateData();
CFileDialog dlg(TRUE,
"dic",
m_strMainDic,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"Dictionary files (*.dic)|*.dic|");
if (dlg.DoModal() == IDOK)
{
m_strMainDic = dlg.GetPathName();
UpdateData(FALSE);
}
}
void CPrPgeSpellOptions_General::OnUserBrowse()
{
UpdateData();
CFileDialog dlg(TRUE,
"dic",
m_strUserDic,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"Dictionary files (*.dic)|*.dic|");
if (dlg.DoModal() == IDOK)
{
m_strUserDic = dlg.GetPathName();
UpdateData(FALSE);
}
}
BOOL CPrPgeSpellOptions_General::OnInitDialog()
{
CPropertyPage::OnInitDialog();
m_cboLanguage.SelectString(0, m_strLanguage);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CPrPgeSpellOptions_General::OnSelchangeLanguage()
{
int iSel = m_cboLanguage.GetCurSel();
m_strLanguage = "";
if (iSel != -1)
m_cboLanguage.GetLBText(iSel, m_strLanguage);
}
|
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.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.