... Microsoft Visual C+ + Windows Applications by Example Code and Explanation for Real-World MFC C+ + Applications Stefan Björnander BIRMINGHAM - MUMBAI Microsoft Visual C+ + Windows Applications by ... Letters Class Example st CString CString stBuffer; pt CPoint CPoint ptMouse; sz CSize CSize szText; rc CRect CRect rcClip; A pointer to an object has the initial p SyntaxTree* pTree; [ 20 ] Chapter ... another object We can overload operators and we can throw exceptions We can create generic classes by using templates and we can organize our classes into namespaces Preface Chapter Windows Development—The...
Ngày tải lên: 27/06/2014, 12:20
... operator The second and third of the following lines are completely interchangeable BankAccount accountOriginal(123); BankAccount accountCopy1(accountOriginal); BankAccount accountCopy2 = accountOriginal; ... copyAccount(account1); cout
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 3 pdf
... indirect) subclass of CObject CRuntimeClass* GetRuntimeClass() const; void WriteClass(const CRuntimeClass* pClass); void WriteObject(const CObject* pObject); CRuntimeClass* ReadClass(const CRuntimeClass* ... parameter pCD that is a pointer to a device context The device context class CDC is a very central part of a Windows application However, CDC is an abstract class, a device context object is instantiated ... static const COLORREF GREY = RGB(128, 128, 128); static const COLORREF BLACK = RGB(0, 0, 0); class CRingDoc : public CDocument { protected: // create from serialization only CRingDoc(); DECLARE_DYNCREATE(CRingDoc)...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 4 pptx
... HideFocus is called, which in 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); ... color Color.h class Color { public: Color(); Color(const COLORREF crRedGreenBlue); Color(const Color& color); operator COLORREF() const; Color& operator=(const Color& color); void Serialize(CArchive& ... m_pFocusView->OnPrepareDC(&dc); dc.LPtoDP(m_rcCaret); m_rcCaret.left = min(m_rcCaret.left, m_rcCaret.right - 1); if (m_rcCaret.left < 0) { m_rcCaret.right += abs(m_rcCaret.left); m_rcCaret.left = 0; } [ 134 ] Chapter...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 5 pot
... Serialize(CArchive& archive); HCURSOR GetCursor() const; BOOL Click(const CPoint& ptMouse); BOOL DoubleClick(const CPoint& ptMouse); BOOL Inside(const CRect& rcInside) const; void MoveOrModify(const CSize& ... Inside(const CRect& rcInside) const; void MoveOrModify(const CSize& szDistance); void Move(const CSize& szDistance); void Draw(CDC* pDC) const; CRect GetArea() const; private: enum {CREATE_RECTANGLE, ... RectangleFigure(const RectangleFigure& rectangle); Figure* Copy() const; void Serialize(CArchive& archive); HCURSOR GetCursor() const; BOOL Click(const CPoint& ptMouse); BOOL DoubleClick(const CPoint&...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 6 docx
... { CRect rcClip = *(CRect*) lHint; int cxMargin = (int) (0.05 * rcClip.Width()); int cyMargin = (int) (0.05 * rcClip.Height()); rcClip.left rcClip.right rcClip.top rcClip.bottom -= += -= += cxMargin; ... scrolling and displaying of the spreadsheet We use the Application Wizard to generate the classes CCalcApp, CMainFrame, CChildFrame, CCalcDoc, CCalcView, and CAboutDlg We will modify CCalcDoc ... cxMargin; cxMargin; cyMargin; cyMargin; [ 235 ] The Draw Application CClientDC dc(this); OnPrepareDC(&dc); dc.LPtoDP(rcClip); InvalidateRect(rcClip); } OnUpdate is also called by OnIntialUpdate in CScrollView...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 7 pptx
... TSetMatrix; class CCalcDoc; [ 270 ] Chapter class Cell { public: Cell(); Cell(const Cell& cell); Cell& operator=(const Cell& cell); void CopyCell(const Cell& cell); void SetCellMatrix(CellMatrix* pCellMatrix) ... bMarked, CDC *pDC) { CRect rcCell(ptTopLeft, CSize(COL_WIDTH, ROW_HEIGHT)); CRect rcMargin(rcCell.left + CELL_MARGIN, rcCell.top + CELL_MARGIN, rcCell.right - CELL_MARGIN, rcCell.bottom - CELL_MARGIN); ... penColor); CPen* pPrevPen = pDC->SelectObject(&pen); CBrush brush(brushColor); CBrush* pPrevBrush = pDC->SelectObject(&brush); pDC->Rectangle(rcCell); pDC->SelectObject(pPrevPen); pDC->SelectObject(pPrevBrush);...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 8 ppsx
... void CCalcView::OnSize(UINT /* uType */, int cxClient, int cyClient) { CClientDC dc(this); OnPrepareDC(&dc); CRect rcClient(0, 0, cxClient, cyClient); dc.DPtoLP(&rcClient); SCROLLINFO scrollInfo; ... { switch (m_eCalcStatus) { case CS_MARK: m_caret.HideCaret(); break; case CS_EDIT: CCalcView* pCalcView = (CCalcView*) m_caret.GetView(); [ 297 ] The Calc Application if (pCalcView->IsCellVisible(m_rfEdit.GetRow(), ... large screen) void CCalcView::OnDraw(CDC* pDC) { CRect rcClient; GetClientRect(&rcClient); pDC->DPtoLP(&rcClient); CPen pen(PS_SOLID, 0, LIGHT_GRAY); CPen *pOldPen = pDC->SelectObject(&pen); CBrush...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 9 doc
... PointToChar(CPoint ptMouse); CRect CharToRect(int iChar); CRect GetCaretRect(int iChar); CRect CharToLineRect(int iChar); void Recalculate(CDC* pDC, RectSet* pRepaintSet = NULL); void ClearRectArray(); ... szUpperLeft + rcCaret; } else { CRect rcChar = m_rectArray[iChar - 1]; CRect rcCaret(rcChar.right, rcChar.top, rcChar.right + rcChar.Width(), rcChar.bottom); return szUpperLeft + rcCaret; } } When ... Application else if (iChar == 0) { return szUpperLeft + m_rectArray[0]; } else if (isHomeChar(iChar)) { CRect rcChar = m_rectArray[iChar]; CRect rcCaret(rcChar.left, rcChar.top, rcChar.right, rcChar.bottom);...
Ngày tải lên: 12/08/2014, 21:20
Microsoft Visual C++ Windows Applications by Example phần 10 ppt
... scroll bars void CWordView::OnSize(UINT /* uType */, int cxClient, int cyClient) { CClientDC dc(this); OnPrepareDC(&dc); CSize szClient(cxClient, cyClient); dc.DPtoLP(&szClient); SCROLLINFO scrollInfo; ... height for each page [ 403 ] The Word Application void CWordView::OnPaint() { CPaintDC dc(this); OnPrepareDC(&dc); CRect rcClient; GetClientRect(&rcClient); dc.DPtoLP(&rcClient); if (rcClient.right ... multiple document interface (MDI) 89 single doucment interface (SDI) 89 document/view model, calc application CalcDoc.cpp 295-307 CalcDoc.h 293-295 CalcView.cpp 319-327 document class 291, 292 document...
Ngày tải lên: 12/08/2014, 21:20
Koenig, moo accelerated c++ practical programming by example
... Library of Congress Cataloging-in-Publication Data Koenig, Andrew Accelerated C+ + : practical programming by example / Andrew Koenig, Barbara E Moo p cm Includes index ISBN 0-201-70353-X C+ + (Computer ... Chapter 11 Defining abstract data types 11.1 The Vec class 11.2 Implementing the Vec class 11.3 Copy control 11.4 Dynamic Vecs 11.5 Flexible memory management 11.6 Details Chapter 12 Making class ... Accelerated C+ + Practical Programming by Example by Andrew Koenig and Barbara E Moo Addison-Wesley, 2000 ISBN 0-201-70353-X Pages 336 Second Printing Table of Contents Contents Chapter...
Ngày tải lên: 19/03/2014, 14:10
Báo cáo khoa học: A strategy for the generation of specific human antibodies by directed evolution and phage display An example of a single-chain antibody fragment that neutralizes a major component of scorpion venom docx
... GGCGGATCAGGAGGCGGAGGTTCTGGTGGAGGTGGGAGTAATTTTATGCTGACTCAGCCCCA CCACCAGAACCTCCGCCTCCTGATCCGCCACCTCCTGAGGAGACGGTGACCAGGGTGCC CCACCAGAACCTCCGCCTCCTGATCCGCCACCTCCTGAAGAGACGGTGACCATTGTCCC CCACCAGAACCTCCGCCTCCTGATCCGCCACCTCCTGAGGAGACGGTGACCAGGGTTCC ... GGCGGATCAGGAGGCGGAGGTTCTGGTGGAGGTGGGAGTTCCTATGTGCTGACTCAGCCACC GGCGGATCAGGAGGCGGAGGTTCTGGTGGAGGTGGGAGTCACGTTATACTGACTCAACCGCC GGCGGATCAGGAGGCGGAGGTTCTGGTGGAGGTGGGAGTCAGGCTGTGCTCACTCAGCCGTC GGCGGATCAGGAGGCGGAGGTTCTGGTGGAGGTGGGAGTAATTTTATGCTGACTCAGCCCCA ... GGCGGATCAGGAGGCGGAGGTTCTGGTGGAGGTGGGAGTCAGCTCGTGTTGACGCAGCCGCC GGCGGATCAGGAGGCGGAGGTTCTGGTGGAGGTGGGAGTCAGTCTGCCCTGACTCAGCCTGC GGCGGATCAGGAGGCGGAGGTTCTGGTGGAGGTGGGAGTTCTTCTGAGCTGACTCAGGACCC GGCGGATCAGGAGGCGGAGGTTCTGGTGGAGGTGGGAGTTCCTATGTGCTGACTCAGCCACC...
Ngày tải lên: 23/03/2014, 13:20
VHDL Programming by Example 4th Edition
... Generics in Configurations Generic Value Specification in Architecture Generic Specifications in Configurations Board-Socket-Chip Analogy Block Configurations Architecture Configurations 174 176 179 ... Each block represents a self-contained area of the model Each block can declare local signals, types, constants, and so on Any object that can be declared in the architecture declaration section ... are called concurrent statements, because all the statements execute concurrently Concurrent Signal Assignment In a typical programming language such as C or C+ +, each assignment statement executes...
Ngày tải lên: 16/08/2012, 08:46
Đề thi Java By Example
... Để chạy c chương trình java , c c ch c i đặt JDK C) Chương trình java chạy ko c n c i đặt JDK D) Chương trình java ko c n c i đặt JDE dịch trở thành mã máy // not sure 4.Cho đoạn mã sau: Class ... Kết chạy đoạn chương trình là: A)X B)Y C) Z D)Lỗi biên dịch E) Lỗi chạy chương trình 5.Phát biểu dành cho đối tượng java.util.Scanner? A)Dấu phân c ch m c định dấu hai chấm B)Dấu phân c ch m c định ... nhiều catch, lớp lỗi phải c đặt trư c lớp lỗi cha C) Một c u lệnh ko c từ khóa throw ko c n đặt khối try catch D)Nhiều lỗi (exception) c truyền sử dụng lệnh throw 8.Phát biểu package sai (chọn2)...
Ngày tải lên: 18/09/2012, 09:13
Lập trình C Windows 07_Các khái niệm
... message wc.hInstance = hInstance; wc.hCursor = LoadCursor(hInstance, (LPSTR) IDC_CURSOR); wc.hIcon = LoadIcon(hInstance, (LPSTR) IDI_ICON); wc.hbrBackground = (HBRUSH) (COLOR_APPWORKSPACE + 1); wc.lpszMenuName ... họa c u tr c WNDCLASS typedef struct _WNDCLASS { UINT style; WNDPROC lpfnWndProc; int cbClsExtra; int cbWndExtra; HINSTANCE hInstance; HICON hIcon; HCURSOR hCursor; HBRUSH hbrBackground; LPCTSTR ... tảng HĐH Windows Cung c p tất c ng c c n thiết để xây dựng ứng dụng Windows Đư c sử dụng thư viện sở để tạo thư viện c p cao ngôn ngữ lập trình VD OWL BorlandC, MFC Visual C+ +,… C4 W - Basic - Nguyen...
Ngày tải lên: 14/11/2012, 17:00
Lập trình C Windows 08_Các kiểu dữ liệu cơ bản
... LPARAM LPBOOL LPBYTE LPCOLORREF LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWCH PCWSTR PDWORD ... đến kiểu BYTE trỏ đến kiểu COLORREF trỏ đến chuỗi ký tự hằng, kết th c Đây chuỗi dạng ANSI bits/ký tự trỏ chuỗi ký tự Nếu c hiệu UNICODE định nghĩa, kiểu tương đương với LPCWSTR; ngư c lại tương ... hằng, kết th c Đây chuỗi dạng ANSI bits/ký tự trỏ chuỗi ký tự Nếu c hiệu UNICODE định nghĩa, kiểu tương đương với PCWSTR; ngư c lại tương đương với PCSTR trỏ đến kiểu WCHAR trỏ đến chuỗi ký tự...
Ngày tải lên: 14/11/2012, 17:00
Lập trình C Windows 10_Generic_App
... wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon ... LoadIcon(hInstance, (LPCTSTR)IDI _C) ; wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = (LPCSTR)IDC _C; wcex.lpszClassName = szWindowClass; ... tả số chương trình // Generic_App.h // Sử dụng cho: Generic_App.cpp, Generic_App.rc // Nguyen Tri Tuan - Khoa CNTT – ĐH.KHTN Tp.HCM // -// Used by C. RC // #define...
Ngày tải lên: 14/11/2012, 17:00