... BankAccount account2( 124 , 20 0); cout << "Account2: number " << account2.GetNumber() // 124 << ", $" << account2.GetSaldo() << endl; // 20 0 // ... called every time an object of the class is created. // The default constructor is called for each car object. Car carArray[3]; carArray [2] .IncreaseSpeed(100); // The default constructor...
Ngày tải lên: 12/08/2014, 21:20
... the Application Wizard to generate the classes CCalcApp, CMainFrame, CChildFrame, CCalcDoc, CCalcView, and CAboutDlg. We will modify CCalcDoc and CCalcView as we develop the application, the ... SetPreviousText(CDC* pDC); void Draw(CDC* pDC) const; CRect GetArea() const; Font* GetFont(); void SetFont(const Font& font, CDC* pDC); private: void GenerateCaretArray(CDC* pDC); public:...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 3 pdf
... (Logical Coordinates to Device Coordinates) translates MFC class objects CSize, and CRect, and (one or more) CPoint objects between logical and device coordinates. void DPtoLP(CSize* pSize) const; void ... The cursor is set in the view class by the SetCursor Win 32 API function. CWinApp* AfxGetApp(); HCURSOR LoadStandardCursor(CString stCursorName) const; HCURSOR SetCursor(HCURSOR hCurs...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 4 pptx
... turn calls the Win 32 API function DestroyCaret. Caret.cpp void Caret::SetAndShowCaret(const CRect rcCaret) { m_rcCaret = rcCaret; CClientDC dc(m_pFocusView); m_pFocusView->OnPrepareDC(&dc); ... throws an exception. The check_memory macro catches it and aborts the execution with an error message. Check.h #define check_memory(alloc_code) { try { alloc_code; } catch (CE...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 5 pot
... object is created, is connected to the document object by the pointer m_pTetrisDoc. int CTetrisView::OnCreate(LPCREATESTRUCT lpCreateStruct) { // We check that the view has been correctly created. ... DoubleClick(const CPoint& ptMouse); BOOL Inside(const CRect& rcInside) const; void MoveOrModify(const CSize& szDistance); void Move(const CSize& szDistance); void Draw(C...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 7 pptx
... code will be clearer. a2 a2 c2 c2 b1 b3 b1 b3 source source source source (a2) = {} (b1) = {} (b3) = {a2} (c2 ) = {a2, b1} target target target target (a2) = {b3, c2 } (b1) = {c2 } (b3) = {} (c2 ) ... GetSourceSet. Chapter 8 [ 24 7 ] Reference.h class Reference { public: Reference(); Reference(int iRow, int iCol); Reference(const Reference& reference); Reference operator=(cons...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 8 ppsx
... rcCurrCell.GetRow(), COLS - 1); Chapter 8 [ 29 3 ] class CCalcDoc : public CDocument { protected: DECLARE_DYNCREATE(CCalcDoc) DECLARE_MESSAGE_MAP() CCalcDoc(); public: virtual void Serialize(CArchive& ... application may have several view objects, but only one document object. CalcView.cpp int CCalcView::OnCreate(LPCREATESTRUCT lpCreateStruct) { // We check that the view has been...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 9 doc
... (isHomeChar(iChar)) { CRect rcChar = m_rectArray[iChar]; CRect rcCaret(rcChar.left, rcChar.top, rcChar.right, rcChar.bottom); return szUpperLeft + rcCaret; } else { CRect rcChar = m_rectArray[iChar ... m_rectArray[iChar - 1]; CRect rcCaret(rcChar.right, rcChar.top, rcChar.right + rcChar.Width(), rcChar.bottom); return szUpperLeft + rcCaret; } } When the user scrolls up and down t...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 10 ppt
... application cell 26 8 cell.cpp 27 5 -28 5 cell.h 27 0 -27 4 CellMatrix.cpp 28 7 CellMatrix.h 28 6 CellMatrix class 28 6 TSetMatrix.cpp 28 9 -29 1 TSetMatrix.h 28 8 TSetMatrix class 28 7, 28 8 square class, tetris application Square.h ... 103 RingView.cpp 1 12, 113 S scroll bar setting 114 serialization 99, 100 RingDoc.cpp 124 , 125 set class, MFC class about 137 example 137-140 siz...
Ngày tải lên: 12/08/2014, 21:20