www.pudn.com > 智能内码识别,支持屏幕取词翻译的程序.zip > INPUTSE1.CPP


// inputse1.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "resource.h" 
#include	"cspublic.h" 
#include	"systemse.h" 
#include "inputse1.h" 
 
#ifdef _DEBUG 
#undef THIS_FILE 
static char BASED_CODE THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CInputSe1 dialog 
 
 
CInputSe1::CInputSe1(UINT id) 
	: CCommonPage(id) 
{ 
	m_nEnOrCh =!GetInputStatus123( 1 ) ; 
	m_nNoSpace =!GetInputStatus123( 2 ) ; 
	m_nBjOrQj = !GetInputStatus123( 3 ) ; 
	//{{AFX_DATA_INIT(CInputSe1) 
	//}}AFX_DATA_INIT 
} 
 
void CInputSe1::DoDataExchange(CDataExchange* pDX) 
{ 
	CPropertyPage::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CInputSe1) 
	DDX_Radio(pDX, IDC_RADIO1, m_nEnOrCh); 
	DDX_Radio(pDX, IDC_RADIO3, m_nNoSpace); 
	DDX_Radio(pDX, IDC_RADIO5, m_nBjOrQj); 
	//}}AFX_DATA_MAP 
} 
 
BEGIN_MESSAGE_MAP(CInputSe1, CPropertyPage) 
	//{{AFX_MSG_MAP(CInputSe1) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
 
///////////////////////////////////////////////////////////////////////////// 
// CInputSe1 message handlers 
 
void CInputSe1::OnOK() 
{ 
	// TODO: Add extra validation here 
	if( m_nEnOrCh!=m_nOldEnOrCh ) 
	{ 
		SetInputStatus123( 1 ) ; 
		::SendMessage( GetInputBarHandle() , 
			WM_USER_CHANGE_BUTTON_STATUS , 0 , 0 ) ; 
	} 
	if( m_nNoSpace!=m_nOldNoSpace ) 
	{ 
		SetInputStatus123( 2 ) ; 
		::SendMessage( GetInputBarHandle() , 
			WM_USER_CHANGE_BUTTON_STATUS , 1 , 0 ) ; 
	} 
	if( m_nBjOrQj!=m_nOldBjOrQj ) 
	{ 
		SetInputStatus123( 3 ) ; 
		::SendMessage( GetInputBarHandle() , 
			WM_USER_CHANGE_BUTTON_STATUS , 2 , 0 ) ; 
	} 
		 
	CPropertyPage::OnOK(); 
} 
 
BOOL CInputSe1::OnInitDialog() 
{ 
	CCommonPage::OnInitDialog(); 
	 
	// TODO: Add extra initialization here 
	m_nOldEnOrCh	=m_nEnOrCh ; 
	m_nOldNoSpace	=m_nNoSpace ; 
	m_nOldBjOrQj	=m_nBjOrQj ; 
	 
	return TRUE;  // return TRUE  unless you set the focus to a control 
}