///////////////////////////////////////////////////////////////////////////// // CRectangleView drawing
void CRectangleView::OnDraw(CDC* pDC) { CRectangleDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); // TODO: add draw code for native data here }
///////////////////////////////////////////////////////////////////////////// // CRectangleView printing
BOOL CRectangleView::OnPreparePrinting(CPrintInfo* pInfo) { // default preparation return DoPreparePrinting(pInfo); }
void CRectangleView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add extra initialization before printing }
void CRectangleView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add cleanup after printing }
///////////////////////////////////////////////////////////////////////////// // CRectangleView diagnostics
#ifdef _DEBUG
void CRectangleView::AssertValid() const { CView::AssertValid(); }
void CRectangleView::Dump(CDumpContext& dc) const { CView::Dump(dc); }
CRectangleDoc* CRectangleView::GetDocument() // non-debug version is inline
VC++大作业
{ ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRectangleDoc))); return (CRectangleDoc*)m_pDocument; }
#endif //_DEBUG
///////////////////////////////////////////////////////////////////////////// // CRectangleView message handlers
void CRectangleView::OnLButtonDown(UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default this->m_OrigPoint=point; CView::OnLButtonDown(nFlags, point); }
void CRectangleView::OnLButtonUp(UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default CClientDC dc(this);
dc.Rectangle(CRect(m_OrigPoint,point)); CView::OnLButtonUp(nFlags, point); }
5输入输出情况及截图
VC++大作业
VC++大作业
6总结体会
通过前期对VC++的学习和这次大作业,我对VC++有了进一步的认识,而且熟悉了如何建立单文档程序,多文档等程序,对Visual C++ 6.0 开发环境有了进一步了解,最重要的一点是我知道自己还有很多VC++知识要学,目前学到的知识只是一点皮毛而已,以后一定会更加努力,虽然VC++不是我的专业课,我们对它的要求也不是特别高,但是我觉得我以后还是会学一学这个的,多掌握一门编程语言,而且VC++在图形化编程里面用的还是比较广泛的,对我们的未来的发展只有好处,没有坏处!
VC++大作业
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库VC++程序设计大作业之绘制矩形(2)在线全文阅读。
相关推荐: