# include
The class CMyWnd: public CFrameWnd
{
Public:
CMyWnd (LPCTSTR szTitle)
{
Create (NULL, szTitle);
}
};
Class CMyApp: public CWinApp
{
Public:
Virtual BBOL InitInstance ();
};
BOOL CMyApp: : InitInstance ()
{
Int nRet=AfxMessageBox (_T (" test "), MB_ABORTRETRYIGNORE);
If (nRet==IDABORT)
{
AfxMessageBox (_T (" users to click on the 'end') ", MB_OK | MB_ICONINFORMATION);
}
Else if (nRet==IDRETRY)
{
AfxMessageBox (_T (" users to click on 'retry' "), MB_OK | MB_ICONINFORMATION);
}
The else
{
AfxMessageBox (_T (" users to click on the 'ignore') ", MB_OK | MB_ICONINFORMATION);
}
M_pMainWnd=new CMyWnd (_T (" a simple MFC program "));
M_pMainWnd - & gt; ShowWindow (m_nCmdShow);
Return TRUE;
}
CMyApp myApp.
CodePudding user response:
You create a console and check on the use of MFC,# pragma comment (would, "/subsystem: Windows/entry: WinMainCRTStartup")
Modify Settings ~ or engineering properties