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


// exitcs.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include	"resource.h" 
#include	"cspublic.h" 
#include "exitcs.h" 
 
#ifdef _DEBUG 
#undef THIS_FILE 
static char BASED_CODE THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CExitCs dialog 
 
 
CExitCs::CExitCs(UINT nIDTemplate , CWnd* pParent /*=NULL*/) 
	: CVersion(nIDTemplate, pParent) 
{ 
	m_bExitWinFlag	=GetPrivateProfileInt( "系统参数" , 
		"是否同时退出Windows" , 0 , INI_FILE_NAME ) ; 
	//{{AFX_DATA_INIT(CExitCs) 
	m_bPromptFlag = FALSE; 
	//}}AFX_DATA_INIT 
} 
 
void CExitCs::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CExitCs) 
	DDX_Check(pDX, IDC_CHECK1, m_bPromptFlag); 
	DDX_Check(pDX, IDC_CHECK2, m_bExitWinFlag); 
	//}}AFX_DATA_MAP 
} 
 
BEGIN_MESSAGE_MAP(CExitCs, CDialog) 
	//{{AFX_MSG_MAP(CExitCs) 
		// NOTE: the ClassWizard will add message map macros here 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
 
///////////////////////////////////////////////////////////////////////////// 
// CExitCs message handlers 
void	CExitCs::OnOK() 
{ 
	UpdateData( 1 ) ; 
	SetPrompt( !m_bPromptFlag ) ; 
	SetExitWin( m_bExitWinFlag ) ; 
	 
	CVersion::OnOK() ; 
	 
	if( m_bExitWinFlag ) 
		::ExitWindows( 0 , 0 ) ; 
		//EW_RESTARTWINDOWS , 0 ) ; 
}