CHINESEP.CPP
上传用户:zhang8947
上传日期:2007-01-08
资源大小:1910k
文件大小:2k
- // chinesep.cpp : implementation file
- //
- #include "stdafx.h"
- #include "resource.h"
- #include "cspublic.h"
- #include "cskernel.h"
- #include "systemse.h"
- //#include "chinesep.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CChinesePage dialog
- CChinesePage::CChinesePage( UINT uID )
- : CCommonPage(uID)
- {
- //得到是否自动识别GB、BIG5
- m_bRecGbB5 =GetRecGbBig5() ;
- //得到是否自动识别HZ码
- m_bRecHz =GetRecHz() ;
- //得到输出汉字是简体还是繁体,1为简体,0为繁体
- m_nJianFanFont =!IsJt() ;
- //得到是否以系统的内码为优先
- m_nSystemFirst =!GetSystemFirst() ;
- //得到当前系统的内码
- m_nSystemCode =GetSystemCode() ;
- //{{AFX_DATA_INIT(CChinesePage)
- //}}AFX_DATA_INIT
- }
- void CChinesePage::DoDataExchange(CDataExchange* pDX)
- {
- CPropertyPage::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CChinesePage)
- DDX_Check(pDX, IDC_CHECK1, m_bRecGbB5);
- DDX_Check(pDX, IDC_CHECK2, m_bRecHz);
- DDX_Radio(pDX, IDC_RADIO3, m_nJianFanFont);
- DDX_Radio(pDX, IDC_RADIO1, m_nSystemFirst);
- DDX_CBIndex(pDX, IDC_COMBO1, m_nSystemCode);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CChinesePage, CPropertyPage)
- //{{AFX_MSG_MAP(CChinesePage)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CChinesePage message handlers
- void CChinesePage::OnOK()
- {
- // TODO: Add extra validation here
- BOOL b=0 ;
- //比较数据
- if( m_bRecGbB5!=m_bOldRecGbB5 )
- {
- SwitchRecGbBig5() ;
- b =1 ;
- }
- if( m_bRecHz!=m_bOldRecHz )
- {
- SwitchRecHz() ;
- b =1 ;
- }
- if( m_nJianFanFont!=m_nOldJianFanFont )
- {
- SwitchJtFt() ;
- LoadZk() ; //重新装入显示字库
- b =1 ;
- }
- if( m_nSystemFirst!=m_nOldSystemFirst )
- {
- SwitchSystemFirst() ;
- b =1 ;
- }
- if( m_nSystemCode!=m_nOldSystemCode )
- {
- SetSystemCode( m_nSystemCode ) ;
- b =1 ;
- }
-
- if(b)
- UpdateScreen() ;
-
- CPropertyPage::OnOK();
- }
- BOOL CChinesePage::OnInitDialog()
- {
- CCommonPage::OnInitDialog();
-
- // TODO: Add extra initialization here
- //记录原来的数据
- m_bOldRecGbB5 =m_bRecGbB5 ;
- m_bOldRecHz =m_bRecHz ;
- m_nOldJianFanFont =m_nJianFanFont ;
- m_nOldSystemFirst =m_nSystemFirst ;
- m_nOldSystemCode =m_nSystemCode ;
-
- return TRUE; // return TRUE unless you set the focus to a control
- }