文档编辑一部分代码-

internet02

#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);
}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值