microsoft visual c 2008 step by step phần 9 ppsx

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

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

... rcCurrCell.GetRow(), COLS - 1); Chapter 8 [ 293 ] 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 c...

Ngày tải lên: 12/08/2014, 21:20

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

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

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

... 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 is called ... "BankAccount.h" BankAccount::BankAccount(int iNumber, double dSaldo /* = 0 */) :m_iNUMBER(iNumber), m_dSaldo(dSaldo) { // Empty. } BankAccount::BankAccount(const BankAccount& b...

Ngày tải lên: 12/08/2014, 21:20

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

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 ... Type> TemplateStack<Type>::~TemplateStack() { Cell<Type>* pCurrCell = m_pFirstCell; while (pCurrCell != NULL) { Cell<Type>* pRemoveCell = pCurrCell; pCurrCell =...

Ngày tải lên: 12/08/2014, 21:20

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

... turn calls the Win32 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 (CExc...

Ngày tải lên: 12/08/2014, 21:20

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

... 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

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

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

... 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

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

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

... select the previous pen and brush to the device context. void Cell::Draw(CPoint ptTopLeft, BOOL bEdit, BOOL bMarked, CDC *pDC) { CRect rcCell(ptTopLeft, CSize(COL_WIDTH, ROW_HEIGHT)); CRect ... ROW_HEIGHT)); CRect rcMargin(rcCell.left + CELL_MARGIN, rcCell.top + CELL_MARGIN, rcCell.right - CELL_MARGIN, rcCell.bottom - CELL_MARGIN); Color penColor = (bEdit || bMarked) ? m_textColor.In...

Ngày tải lên: 12/08/2014, 21:20

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

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

... system 93 , 94 cursor 98 device context 94 -98 message system 90 registry 98 serialization 99 , 100 visual studio 88 while statement 30, 31 word, MFC application wizard about 3 29, 331 document class ... 103 RingView.cpp 112, 113 S scroll bar setting 114 serialization 99 , 100 RingDoc.cpp 124, 125 set class, MFC class about 137 example 137-140 size class, MFC class CSize class...

Ngày tải lên: 12/08/2014, 21:20

47 325 0
Từ khóa:
w