Advanced MFC Programming
Advanced MFC Programming Advanced MFC Programming
Clipboard DIB Format Preparing DIB Data Cut & Copy Paste 11.10 Palette Change & Flickering Problems Message WM_PALETTECHANGED Flickering Summary SCREEN CAPTURING & PRINTING 12.1 Capturing the Whole Screen Capture Converting DDB to DIB New Command 12.2 Capturing a Specified Window Picking Up a Window Dialog Box IDD_DIALOG_SELECT New Command 12.3 Simple Printing Mapping Mode Converting between Logical and Device Units Implementing Print Scaling the Image before Printing Displaying or Printing? Function CGDIView::OnDraw(…) 12.4 Fixed Scale Printing Printing Related Functions Sample 12.4\GDI 12.5 Printing on Separate Pages Number of required Pages is Known Beforehand Setting Number of Pages Just Before Printing Starts Calculating the Number of Pages when the Printing Is Undergoing 12.6 Customizing Print Dialog Box Customizing Common Controls Using Custom Dialog Template Summary ADDING SPECIAL FEATURES TO APPLICATION 13.1 One Instance Application Window Creation Function CWnd::PreCreateWindow(…) One-Instance Application in MFC Sample 13.1\Once xii
13.2 Creating Applications without Using Document/View Structure How Application, Document and View Are Bound Together Creating Window Sample 13.2\Gen Excluding Classes from Build 13.3 Implementing Multiple Views Simple View Implementation Attaching Multiple Views to One Document Sample 13.3\Chart Window Origin and View Port Origin MM_ANISOTROPIC & MM_ISOTROPIC Window Extents and View Port Extents Pie Chart Drawing 13.4 Multiple Documents Implementation 13.5 Painting Caption Bar Non-client Area and Related Messages Caption Text Area Sample 13.5\Cap 13.6 Irregular Shape Window Problem Style WS_EX_TRANSPARENT Using Dialog Box Disabling Default Background Painting Disabling Non-client Area Painting Moving the Window with Mouse 13.7 Saving Initial States Where to Save the Information Functions Used to Write and Read Information Format of “.ini” File Sample 13.7\Ini 13.8 Exchanging User-Defined Messages Among Applications Registering User Defined Messages Sample Finding Window & Sending Message 13.9 Z-Order 13.10 Hook Hook Installation System Wide Hook Variables in DLL Defining Data Segment DLL Implementation Sample 13.6\Hook 13.11 Journal Record and Journal Playback Hooks Analyzing Events Playing back the Recorded Events Using Functions Contained in DLL xiii
- Page 1 and 2: Advanced MFC Programming Supporting
- Page 3 and 4: Checking a Menu Item 2.2 Right Clic
- Page 5 and 6: Trapping Double Clicking Message Re
- Page 7 and 8: COMMON DIALOG BOXES 7.1 File Open a
- Page 9 and 10: 9.1 Outputting Text Using Different
- Page 11: Summary SAMPLE: SIMPLE PAINT 11.0 P
- Page 15 and 16: Functions Implementing Comparisons
- Page 17 and 18: Chapter 1. Tool Bar and Dialog Bar
- Page 19 and 20: Chapter 1. Tool Bar and Dialog Bar
- Page 21 and 22: Chapter 1. Tool Bar and Dialog Bar
- Page 23 and 24: Chapter 1. Tool Bar and Dialog Bar
- Page 25 and 26: Chapter 1. Tool Bar and Dialog Bar
- Page 27 and 28: Chapter 1. Tool Bar and Dialog Bar
- Page 29 and 30: Chapter 1. Tool Bar and Dialog Bar
- Page 31 and 32: Chapter 1. Tool Bar and Dialog Bar
- Page 33 and 34: Chapter 1. Tool Bar and Dialog Bar
- Page 35 and 36: Chapter 1. Tool Bar and Dialog Bar
- Page 37 and 38: Chapter 1. Tool Bar and Dialog Bar
- Page 39 and 40: Chapter 1. Tool Bar and Dialog Bar
- Page 41 and 42: Chapter 1. Tool Bar and Dialog Bar
- Page 43 and 44: Chapter 1. Tool Bar and Dialog Bar
- Page 45 and 46: Chapter 1. Tool Bar and Dialog Bar
- Page 47 and 48: Chapter 1. Tool Bar and Dialog Bar
- Page 49 and 50: Chapter 2. Menu Chapter 2 Menu Menu
- Page 51 and 52: Chapter 2. Menu ON_COMMAND(ID_EDIT_
- Page 53 and 54: Chapter 2. Menu “clipboard”. We
- Page 55 and 56: Chapter 2. Menu Using Class CMenu W
- Page 57 and 58: Chapter 2. Menu } After implementin
- Page 59 and 60: Chapter 2. Menu ); UINT nPosition,
- Page 61 and 62: Chapter 2. Menu void CMenuDoc::OnEd
Clipboard DIB Format<br />
Preparing DIB Data<br />
Cut & Copy<br />
Paste<br />
11.10 Palette Change & Flickering<br />
Problems<br />
Message WM_PALETTECHANGED<br />
Flickering<br />
Summary<br />
SCREEN CAPTURING & PRINTING<br />
12.1 Capturing the Whole Screen<br />
Capture<br />
Converting DDB to DIB<br />
New Command<br />
12.2 Capturing a Specified Window<br />
Picking Up a Window<br />
Dialog Box IDD_DIALOG_SELECT<br />
New Command<br />
12.3 Simple Printing<br />
Mapping Mode<br />
Converting between Logical and Device Units<br />
Implementing Print<br />
Scaling the Image before Printing<br />
Displaying or Printing?<br />
Function CGDIView::OnDraw(…)<br />
12.4 Fixed Scale Printing<br />
Printing Related Functions<br />
Sample 12.4\GDI<br />
12.5 Printing on Separate Pages<br />
Number of required Pages is Known Beforehand<br />
Setting Number of Pages Just Before Printing Starts<br />
Calculating the Number of Pages when the Printing Is Undergoing<br />
12.6 Customizing Print Dialog Box<br />
Customizing Common Controls<br />
Using Custom Dialog Template<br />
Summary<br />
ADDING SPECIAL FEATURES TO APPLICATION<br />
13.1 One Instance Application<br />
Window Creation<br />
Function CWnd::PreCreateWindow(…)<br />
One-Instance Application in <strong>MFC</strong><br />
Sample 13.1\Once<br />
xii