Advanced MFC Programming
Advanced MFC Programming Advanced MFC Programming
BUTTONS 4.1 Bitmap Button: Automatic Method Button States Owner-Draw Bitmap Button Automatic Method Sample 4.2 Bitmap Check Box and Radio Button: Method 1 4.3 Subclass Implementing Subclass Bitmap Button 4.4 Bitmap Check Box and Radio Button: Method 2 4.5 Irregular Shape Bitmap Button Transparent Background New Class Overriding Function CBitmapButton::LoadBitmaps(…) Overriding Function CBitmapButton::AutoLoad(…) Overriding Function CBitmapButton::DrawItem(…) Using Class MCBitmapButton 4.6 Making Button Aware of Mouse Position Trapping Message WM_LBUTTONUP within Button User-Defined Message Sample 4.7 Mouse Sensitive Button Setting Capture New Class Implementation Summary COMMON CONTROLS 5.1 Spin Control Using Spin Control with Edit Box 5.2 Customizing the Properties of Spin Control 5.3 Displaying Text Strings in the Buddy Window 5.4 Bitmap Button Buddy 5.5 Slider Including Slider Control in the Application Handling Slider Related Messages 5.6 List Box 5.7 Handling List Box Messages iv
Trapping Double Clicking Message Retrieving the Contents of an Item Message WM_DESTROY 5.8 Combo Box Implementing Combo Boxes Handling Messages CBN_CLOSEUP and CBN_SELCHANGE 5.9 Trapping RETURN key strokes for the Combo Box Problem & Workaround Function CWnd::PreTranslateMessage(…) Accessing the Edit Box of a Combo Box 5.10 Implementing Subclass for the Edit Box of a Combo Box Designing New Classes Implementing Subclass 5.11 Owner Draw List Box and Combo Box Owner-Draw Styles Preparing Bitmaps Identifying Item Types Handling Message WM_MEASUREITEM Handling Message WM_DRAWITEM 5.12 Tree Control Image List Adding Nodes Sample 5.13 Handling Tree Control Messages Handling TVN_ITEMEXPANDING to Change a Node’s Associated Image Handling TVN_ENDLABELEDIT to Enable Label Editing Using the New Class 5.14 Drag-n-Drop Handling New Messages New Member Variables and Functions Node Copy TVN_BEGINDRAG WM_MOUSEMOVE WM_LBUTTONUP 5.15 List Control LV_COLUMN and LV_ITEM Sample Creating Image Lists Creating Columns Creating Sub-items Changing List Style Dynamically 5.16 Tab Control Using Tab Control Handling Tab Control Message 5.17 Animate Control and Progress Control v
- Page 1 and 2: Advanced MFC Programming Supporting
- Page 3: Checking a Menu Item 2.2 Right Clic
- Page 7 and 8: COMMON DIALOG BOXES 7.1 File Open a
- Page 9 and 10: 9.1 Outputting Text Using Different
- Page 11 and 12: Summary SAMPLE: SIMPLE PAINT 11.0 P
- Page 13 and 14: 13.2 Creating Applications without
- 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
BUTTONS<br />
4.1 Bitmap Button: Automatic Method<br />
Button States<br />
Owner-Draw Bitmap Button<br />
Automatic Method<br />
Sample<br />
4.2 Bitmap Check Box and Radio Button: Method 1<br />
4.3 Subclass<br />
Implementing Subclass<br />
Bitmap Button<br />
4.4 Bitmap Check Box and Radio Button: Method 2<br />
4.5 Irregular Shape Bitmap Button<br />
Transparent Background<br />
New Class<br />
Overriding Function CBitmapButton::LoadBitmaps(…)<br />
Overriding Function CBitmapButton::AutoLoad(…)<br />
Overriding Function CBitmapButton::DrawItem(…)<br />
Using Class MCBitmapButton<br />
4.6 Making Button Aware of Mouse Position<br />
Trapping Message WM_LBUTTONUP within Button<br />
User-Defined Message<br />
Sample<br />
4.7 Mouse Sensitive Button<br />
Setting Capture<br />
New Class<br />
Implementation<br />
Summary<br />
COMMON CONTROLS<br />
5.1 Spin Control<br />
Using Spin Control with Edit Box<br />
5.2 Customizing the Properties of Spin Control<br />
5.3 Displaying Text Strings in the Buddy Window<br />
5.4 Bitmap Button Buddy<br />
5.5 Slider<br />
Including Slider Control in the Application<br />
Handling Slider Related Messages<br />
5.6 List Box<br />
5.7 Handling List Box Messages<br />
iv