0
  1. Trang chủ >
  2. Công Nghệ Thông Tin >
  3. Kỹ thuật lập trình >

Microsoft Visual C++ Windows Applications by Example phần 9 doc

Microsoft Visual C++ Windows Applications by Example phần 9 doc

Microsoft Visual C++ Windows Applications by Example phần 9 doc

... (m_stText.IsEmpty())Chapter 9 [ 363 ]enum WordState {WS_EDIT, WS_MARK};typedef CArray<Page> PageArray;class CWordDoc : public CDocument{ private: DECLARE_DYNCREATE(CWordDoc) DECLARE_MESSAGE_MAP() CWordDoc(); ... m_psLastMark; Font *m_pNextFont;};CWordDoc must have a default constructor because it will be created dynamically by the Application Framework.CWordDoc.cppCWordDoc::CWordDoc() :m_eKeyboardState(KM_INSERT), ... that this method is only called when the users create a new document, not when they open an existing document.BOOL CWordDoc::OnNewDocument(){ Font defaultFont; Paragraph* pNewParagraph;...
  • 43
  • 360
  • 0
Microsoft Visual C++ Windows Applications by Example phần 2 doc

Microsoft Visual C++ Windows Applications by Example phần 2 doc

... iNum2 = 9, int iNum3 = 99 ){ return iNum1 + iNum2 + iNum3;}void main(){ cout << Add(1) << endl; // 1 + 9 + 99 = 1 09 cout << Add(1, 2) << endl; // 1 + 2 + 99 = 102 ... the example below, all three calls are legitimate. In the rst call, iNum2 and iNum3 will be given the values 9 and 99 , respectively; in the second call, iNum3 will be given the value 99 . Default ... perform conditional programming by checking the value of macros. In the following example, we dene a system integer according to the underlying operating system.#ifdef WINDOWS #define SYSINT int#endif#ifdef...
  • 43
  • 327
  • 0
Microsoft Visual C++ Windows Applications by Example phần 6 docx

Microsoft Visual C++ Windows Applications by Example phần 6 docx

... CreateFigure(iId); }}The Document ClassCDrawDoc is the document class. Its task is to accept mouse and keyboard input from the CDrawView view objects, to manage the document's data, to ... handle scroll movements. Its only eld m_pDrawDoc is a pointer to the document class object. It is initialized by OnCreate.DrawView.hclass CDrawDoc;class CDrawView: public CScrollView{ private: ... appropriate Figure class object by calling its default constructor. Then we serialize the elds of the gure.DrawDoc.cppvoid CDrawDoc::Serialize(CArchive& archive){ CDocument::Serialize(archive);...
  • 43
  • 357
  • 0
Microsoft Visual C++ Windows Applications by Example phần 3 pdf

Microsoft Visual C++ Windows Applications by Example phần 3 pdf

... function by sending the message from the view to the document.RingView.cpp void CRingView::OnLButtonDown(UINT nFlags, CPoint point){ CRingDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); pDoc->MouseDown(point); ... can save and load document data by the means of Serialization.•••••••Chapter 3[ 89 ]When the rst version of MFC was released, there was no standard logical type in C++. Therefore, the ... will not change anything in the other classes generated by the Application Wizard.Colors and ArraysLet us rst look at CRingDoc. We start by adding two types, ColorArray and PointArray. As the...
  • 43
  • 781
  • 0
Microsoft Visual C++ Windows Applications by Example phần 4 pptx

Microsoft Visual C++ Windows Applications by Example phần 4 pptx

... purpose.RingDoc.h static const int RADIUS = 500;class CRingDoc : public CDocument{ // };RingView.cpp void CRingView::OnDraw(CDC* pDC){ CRingDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); ... this book, it is used to check the document class object in the view class of each application.CRingDoc* pDoc = GetDocument();check(pDoc != NULL);ASSERT_VALID(pDoc);If we run out of dynamic ... Application[ 150 ]TetrisDoc.htypedef CList<int> IntList;const int FIGURE_ARRAY_SIZE = 7;class CTetrisDoc : public CDocument{ protected: CTetrisDoc(); public: virtual ~CTetrisDoc(); void SaveScoreList();...
  • 43
  • 381
  • 0
Microsoft Visual C++ Windows Applications by Example phần 5 pot

Microsoft Visual C++ Windows Applications by Example phần 5 pot

... Draw Application Document as File type long name. This implies that we can start the application in Windows Explorer by choosing the application, or by choosing one of the documents (a le ... (CView::OnCreate(lpCreateStruct) == -1) { return -1; } m_pTetrisDoc = (CTetrisDoc*) m_pDocument; check(m_pTetrisDoc != NULL); ASSERT_VALID(m_pTetrisDoc); return 0;}The Tetris Application[ 164 ]Figure.cppFigure.cpp ... CAboutDlg, CDrawDoc, and CDrawView. The skeleton source code for these classes is automatically generated by Visual Studio. As before, among these classes we will only modify CDrawDoc and CDrawView....
  • 43
  • 309
  • 0
Microsoft Visual C++ Windows Applications by Example phần 7 pptx

Microsoft Visual C++ Windows Applications by Example phần 7 pptx

... EOL VALUE(1)* Expression + Expression EOL 9 9 9 VALUE(1)* VALUE(2) + Expression EOLVALUE(1)* VALUE(2) + VALUE(3) EOLThe derivation can be illustrated by the development of a parse tree.FormulaExpressionEOLFormulaExpressionExpression ... a different order. 9 VALUE(1)* VALUE(2) + Expression EOLVALUE(1)* VALUE(2) + VALUE(3) EOLExpression* Expression + Expression EOL VALUE(1) Expression + Expression EOL 9 9FormulaExpression ... m_stInput = TEXT("=") + m_syntaxTree.ToString(); break; }}The method EditEnd is called by the document class when the user presses the return or Tab key, or presses the mouse (it does not...
  • 43
  • 295
  • 0
Microsoft Visual C++ Windows Applications by Example phần 8 ppsx

Microsoft Visual C++ Windows Applications by Example phần 8 ppsx

... }}The Document/View ModelThis application supports the Document/View model. CCalcDoc is the document class and CCalcView is the view class.The Document ClassThe class CCalcDoc is generated by ... cells one by one. We start by dening a test cell matrix and a test target set matrix, which are copies of the document elds m_cellMatrix and m_tSetMatrix.Then we paste the cells one by one. ... iCellStatus = m_pCalcDoc->GetCalcStatus(); CellMatrix* pCellMatrix = m_pCalcDoc->GetCellMatrix(); Reference rfEdit = m_pCalcDoc->GetEdit(); Reference rfFirstMark = m_pCalcDoc->GetFirstMark();...
  • 43
  • 349
  • 0
Microsoft Visual C++ Windows Applications by Example phần 10 ppt

Microsoft Visual C++ Windows Applications by Example phần 10 ppt

... applicationCWordView.cpp 393 -408CWordView.h 391 visual studioabout 88, 89 Application Wizard 88W windows developmentcoordinate system 93 , 94 cursor 98 device context 94 -98 message system 90 registry 98 serialization ... 117RingDoc.cpp 118RingDoc.h 117message map 90 message system 90 -93 methods 50metric system 93 MFC 88, 89 MFC application wizardabout 104-1 09 calc application 240, 241color dialog 123colors 1 09 coordinate ... 94 -98 message system 90 registry 98 serialization 99 , 100 visual studio 88while statement 30, 31word, MFC application wizardabout 3 29, 331document class 361- 391 line class 332, 333page class 360, 361paragraph...
  • 47
  • 325
  • 0

Xem thêm

Từ khóa: microsoft visual c net step by step free downloadmicrosoft visual c net step by step pdf downloadmicrosoft visual c net step by step pdfmicrosoft visual c 2010 express edition free download for windows 7microsoft visual c 2010 express free download for windows 8microsoft visual c 2010 express free download for windows 7Nghiên cứu sự biến đổi một số cytokin ở bệnh nhân xơ cứng bì hệ thốngNghiên cứu sự hình thành lớp bảo vệ và khả năng chống ăn mòn của thép bền thời tiết trong điều kiện khí hậu nhiệt đới việt namNghiên cứu tổ chức pha chế, đánh giá chất lượng thuốc tiêm truyền trong điều kiện dã ngoạiGiáo án Sinh học 11 bài 13: Thực hành phát hiện diệp lục và carôtenôitGiáo án Sinh học 11 bài 13: Thực hành phát hiện diệp lục và carôtenôitGiáo án Sinh học 11 bài 13: Thực hành phát hiện diệp lục và carôtenôitGiáo án Sinh học 11 bài 13: Thực hành phát hiện diệp lục và carôtenôitNGHIÊN CỨU CÔNG NGHỆ KẾT NỐI VÔ TUYẾN CỰ LY XA, CÔNG SUẤT THẤP LPWAN SLIDEQuản lý hoạt động học tập của học sinh theo hướng phát triển kỹ năng học tập hợp tác tại các trường phổ thông dân tộc bán trú huyện ba chẽ, tỉnh quảng ninhPhối hợp giữa phòng văn hóa và thông tin với phòng giáo dục và đào tạo trong việc tuyên truyền, giáo dục, vận động xây dựng nông thôn mới huyện thanh thủy, tỉnh phú thọPhát hiện xâm nhập dựa trên thuật toán k meansNghiên cứu, xây dựng phần mềm smartscan và ứng dụng trong bảo vệ mạng máy tính chuyên dùngNghiên cứu tổng hợp các oxit hỗn hợp kích thƣớc nanomet ce 0 75 zr0 25o2 , ce 0 5 zr0 5o2 và khảo sát hoạt tính quang xúc tác của chúngTìm hiểu công cụ đánh giá hệ thống đảm bảo an toàn hệ thống thông tinChuong 2 nhận dạng rui roGiáo án Sinh học 11 bài 15: Tiêu hóa ở động vậtGiáo án Sinh học 11 bài 14: Thực hành phát hiện hô hấp ở thực vậtGiáo án Sinh học 11 bài 14: Thực hành phát hiện hô hấp ở thực vậtBÀI HOÀN CHỈNH TỔNG QUAN VỀ MẠNG XÃ HỘIHIỆU QUẢ CỦA MÔ HÌNH XỬ LÝ BÙN HOẠT TÍNH BẰNG KIỀM