#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSampleMFCApp
BEGIN_MESSAGE_MAP(CSampleMFCApp, CWinApp)
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
// CSampleMFCApp construction
CSampleMFCApp::CSampleMFCApp()
{
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CSampleMFCApp object
CSampleMFCApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CSampleMFCApp initialization
BOOL CSampleMFCApp::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.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
//--------------------------------------------------
//For AppFace
//Line 1 , load the skin
SkinStart(_T("..\\..\\skins\\basic_urf\\belv_af.urf"),WINDOW_TYPE_VC,"",GTP_LOAD_FILE,NULL,NULL);
//--------------------------------------------------
CSampleMFCDlg dlg;
m_pMainWnd = &dlg;
int 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
}
//--------------------------------------------------
//For AppFace
//Line 2 , cleanup
SkinRemove() ;
//--------------------------------------------------
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
------解决方案--------------------------------------------------------
C++
MFC
------解决方案--------------------------------------------------------
你的范围太大了,要我说能看懂这代码的人
起码已经可以利用vc++独立开发项目了
------解决方案--------------------------------------------------------
mfc弄懂了,这段代码就没问题了。
------解决方案--------------------------------------------------------
MFC
这是模板吧,不弄懂也可以
CSampleMFCDlg是主对话框,和winform一样,也就是读取控件的值,处理消息等等。