友情提示:如果本网页打开太慢或显示不完整,请尝试鼠标右键“刷新”本网页!阅读过程发现任何错误请告诉我们,谢谢!! 报告错误
狗狗书籍 返回本书目录 我的书架 我的书签 TXT全本下载 进入书吧 加入书签

C语言实例教程(PDF格式)-第107章

按键盘上方向键 ← 或 → 可快速上下翻页,按键盘上的 Enter 键可回到本书目录页,按键盘上方向键 ↑ 可回到本页顶部!
————未阅读完?加入书签已便下次继续阅读!






{  



arTextOut(0;yval;pDoc…》data_string'loop_index';  



pDoc…》data_string'loop_index'。GetLength());  



yval+=tm。tmHeight;  



}  



// TODO: add draw code for native data here  



}  



/////////////////////////////////////////////////////////////////////////////  



// CMdiView printing  



// CMdiView diagnostics  



// 。。。  



#ifdef _DEBUG  



void CMdiView::AssertValid() const  



 {  



CView::AssertValid();  



}  



// 。。。  



// CMdiView message handlers  


…………………………………………………………Page 508……………………………………………………………

void CMdiView::OnChar(UINT nChar; UINT nRepCnt; UINT nFlags)   



{  



// TODO: Add your message handler code here and/or call default  



CMdiDoc *pDoc=GetDocument();  



CClientDC dc(this);  



OnPrepareDC(&dc);  



if(nChar=='r'){  



pDoc…》line_number++;  



}  



else{  



pDoc…》data_string'pDoc…》line_number'+=nChar;  



TEXTMETRIC tm;  



dc。GetTextMetrics(&tm);  



dc。TextOut(0;(int)pDoc…》line_number*tm。tmHeight;  



pDoc…》data_string'pDoc…》line_number';  



pDoc…》data_string'pDoc…》line_number'。GetLength());  



}  



pDoc…》UpdateAllViews(this;0l;NULL);  



pDoc…》SetModifiedFlag();  



CView::OnChar(nChar; nRepCnt; nFlags);  



}  



void CMdiView::OnUpdate(CView* pSender; LPARAM lHint; CObject* pHint)   



{  



// TODO: Add your specialized code here and/or call the base class  



Invalidate();  



}  


…………………………………………………………Page 509……………………………………………………………

void CMdiView::OnInitialUpdate()   



{  



CView::OnInitialUpdate();  



// TODO: Add your specialized code here and/or call the base class  



}  



// Mdi。h : main header file for the MDI application  



#if !defined(AFX_MDI_H__6A6E4EF9_1FC8_11D2_BC8B_E95B8191F13C__INCLUDED_)  



// 。。。  



/////////////////////////////////////////////////////////////////////////////  



// CMdiApp:  



// See Mdi。cpp for the implementation of this class  



//  



class CMdiApp : public CWinApp  



{  



public:  



CMdiApp();  



// Overrides  



// ClassWizard generated virtual function overrides  



//{{AFX_VIRTUAL(CMdiApp)  



public:  



virtual BOOL InitInstance();  



//}}AFX_VIRTUAL  



// 。。。  



DECLARE_MESSAGE_MAP()  



};  



// 。。。  


…………………………………………………………Page 510……………………………………………………………

#endif // !defined(AFX_MDI_H__6A6E4EF9_1FC8_11D2_BC8B_E95B8191F13C__INCLUDED_)  



    



// Mdi。cpp : Defines the class behaviors for the application。  



#include 〃stdafx。h〃  



#include 〃Mdi。h〃  



#include 〃MdiSplitFrm。h〃  



#include 〃MainFrm。h〃  



// 。。。  



// CMdiApp  



// 。。。  



// CMdiApp construction  



// 。。。  



// The one and only CMdiApp object  



CMdiApp theApp;  



// CMdiApp initialization  



// 。。。  



CMultiDocTemplate* pDocTemplate;  



pDocTemplate = new CMultiDocTemplate(  



IDR_MDITYPE;  



RUNTIME_CLASS(CMdiDoc);  



RUNTIME_
返回目录 上一页 下一页 回到顶部 0 0
未阅读完?加入书签已便下次继续阅读!
温馨提示: 温看小说的同时发表评论,说出自己的看法和其它小伙伴们分享也不错哦!发表书评还可以获得积分和经验奖励,认真写原创书评 被采纳为精评可以获得大量金币、积分和经验奖励哦!