#include "TextoDoc.h"
#include "TextoView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/
// CTextoView
IMPLEMENT_DYNCREATE(CTextoView, CView)
BEGIN_MESSAGE_MAP(CTextoView, CView)
//{{AFX_MSG_MAP(CTextoView)
ON_WM_CREATE()
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/
// CTextoView construction/destruction
CTextoView::CTextoView()
{
// TODO: add construction code here
}
CTextoView::~CTextoView()
{
}
BOOL CTextoView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/
// CTextoView drawing
void CTextoView::OnDraw(CDC* pDC)
{
CTextoDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
CString str("中国教育基金会 中国教育管理委员协会");
pDC->TextOut(50,50,str);
str.LoadString(IDS_ZHENGHANG);
pDC->TextOut(50,100,str);
CSize sz=pDC->GetTextExtent(str);
str.LoadString(IDS_CHENRUI);
pDC->TextOut(50,130,str);
pDC->BeginPath();
pDC->Rectangle(50,50,50+sz.cx,50+sz.cy);
pDC->EndPath();
for(int i=0;i<900;i+=10)
{
pDC->MoveTo(0,i);
pDC->LineTo(900,i);
pDC->MoveTo(i,0);
pDC->LineTo(i,900);
}
}