hello MFC 出不来了 ! 有劲没使的人都来看,捧捧场!
class CMyWinApp : public CWinApp // mfc1.h
{
public:
BOOL InitInstance();
};
class CMainWinodw: public CFrameWnd
{
public:
CMainWindow();
protected:
afx_msg void OnPaint( );
DECLARE_MESSAGE_MAP();
};
#include <afxwin.h>//*.cpp
#include "mfc1.h"
CMyWinApp myApp;
BOOL CMyWinApp::InitInstance( )
{
m_pMainWnd = new CMainWindow ;
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
BEGIN_MESSAGE_MAP( CMainWindow , CFrameWnd)
ON_WM_PAINT()
END_MESSAGE_MAP()
CMainWindow::CMainWindow()
{
Create(NULL,_T("The Hello Application"));
}
void CMainWindow::OnPaint()
{
CPaintDC dc(this);
CRect rect;
GetClientRect(&rect);
dc.DrawText(_T("Hello,MFC"),-1,&rect,
DT_SINGLBLINE|DT_CENTER|DT_VCENTER);
}
//工程 是win32 project 不知道是不是这个文件!
//我是根据MFC windows编程中的第一例子手抄的,不知道为什么不对
//哥哥姐姐行行好吧!