MFC编程实例
源代码在线查看: btn.cpp
#include "stdafx.h"
#include "Btn.h"
#include "BtnDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
BEGIN_MESSAGE_MAP(CBtnApp, CWinApp)
//{{AFX_MSG_MAP(CBtnApp)
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
CBtnApp::CBtnApp()
{
}
CBtnApp theApp;
BOOL CBtnApp::InitInstance()
{
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif
CBtnDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
return FALSE;
}