www.pudn.com > Indicator.rar > LedButtonDemo.cpp, change:2004-12-24,size:3760b


//                                                                -*- C++ -*- 
// ========================================================================== 
//! 
//! \file LedButtonDemo.cpp 
//! 
//! \brief Defines the class behaviors for the application. 
//! 
//! \author  
//!    Ricky Marek <A HREF="mailto:ricky.marek@gmail.com">ricky.marek@gmail.com</A> 
//! 
//!	\par Disclaimer 
//!    This code and the accompanying files are provided <b>"as is"</b> with 
//!    no expressed  or  implied warranty.  No responsibilities  for possible 
//!    damages, or side effects in its functionality.  The  user must assume  
//!    the entire risk of using this code.  The author accepts no  liability 
//!    if it causes any damage to your computer, causes your pet to fall ill,  
//!    increases baldness or makes your car  start  emitting  strange noises  
//!    when you start it up.  <i>This code  has no bugs,  just  undocumented  
//!    features!.</i> 
//! 
//! \par Terms of use 
//!    This code is <b>free</b> for personal use, or freeware applications as 
//!    long as this comment-header  header remains like this.  If you plan to  
//!    use  this  code in  a commercial  or shareware  application,   you are  
//!    politely  asked  to  contact the author for his permission via e-mail.  
//!    From: <A HREF="mailto:ricky.marek@gmail.com">ricky.marek@gmail.com</A> 
//! 
//! \par Attributes 
//!    \li \b Created       21/Dec/2002 
//!    \li \b Last-Updated  22/Dec/2004 
//!    \li \b Compiler      Visual C++ 
//!    \li \b Requirements  Win98/Win2k or later, MFC. 
//!    \li \b Tested        with Visual 7.1(.NET 2003) 
//! 
//! 
// ========================================================================== 
 
#include "stdafx.h" 
#include "LedButtonDemo.h" 
#include "LedButtonDemoDlg.h" 
 
 
#ifdef _DEBUG 
#undef THIS_FILE 
static char THIS_FILE[]=__FILE__; 
#define new DEBUG_NEW 
#endif 
 
 
 
// CLedButtonDemoApp 
 
BEGIN_MESSAGE_MAP(CLedButtonDemoApp, CWinApp) 
	ON_COMMAND(ID_HELP, CWinApp::OnHelp) 
END_MESSAGE_MAP() 
 
 
// CLedButtonDemoApp construction 
 
CLedButtonDemoApp::CLedButtonDemoApp() 
{ 
	// TODO: add construction code here, 
	// Place all significant initialization in InitInstance 
} 
 
 
// The one and only CLedButtonDemoApp object 
 
CLedButtonDemoApp theApp; 
 
 
// CLedButtonDemoApp initialization 
 
BOOL CLedButtonDemoApp::InitInstance() 
{ 
	// InitCommonControls() is required on Windows XP if an application 
	// manifest specifies use of ComCtl32.dll version 6 or later to enable 
	// visual styles.  Otherwise, any window creation will fail. 
	InitCommonControls(); 
 
	CWinApp::InitInstance(); 
 
	AfxEnableControlContainer(); 
 
	// Standard initialization 
	// If you are not using these features and wish to reduce the size 
	// of your final executable, you should remove from the following 
	// the specific initialization routines you do not need 
	// Change the registry key under which our settings are stored 
	// TODO: You should modify this string to be something appropriate 
	// such as the name of your company or organization 
	//SetRegistryKey(_T("Local AppWizard-Generated Applications")); 
 
	CLedButtonDemoDlg dlg; 
	m_pMainWnd = &dlg; 
	INT_PTR nResponse = dlg.DoModal(); 
	if (nResponse == IDOK) 
	{ 
		// TODO: Place code here to handle when the dialog is 
		//  dismissed with OK 
	} 
	else if (nResponse == IDCANCEL) 
	{ 
		// TODO: Place code here to handle when the dialog is 
		//  dismissed with Cancel 
	} 
 
	// Since the dialog has been closed, return FALSE so that we exit the 
	//  application, rather than start the application's message pump. 
	return FALSE; 
} 
 
// 
// --- No-code-allowed-beyond-this-line-------------------------------------- 
//