Acknowledgments | p. xvii |
Preface | p. xix |
The Fundamentals | |
Overview of the Pocket PC Environment | p. 3 |
The Basic User Interface | p. 5 |
The Architecture of Windows CE | p. 6 |
Inside the GWE Subsystem | p. 10 |
Reviewing the Graphics Device Interface (GDI) | p. 13 |
Logical Design of a Windows Program | p. 17 |
Processing Messages Within a Program | p. 18 |
Updating the Client Area of Your Window | p. 20 |
Summary | p. 21 |
A Typical Pocket PC Program | p. 23 |
Unique Features of a Windows CE Program | p. 24 |
Using Machine-Portable String Processing with TCHAR | p. 27 |
Overview of a Simple Windows Program | p. 29 |
General Windows Program Logic | p. 33 |
A Typical Windows Program | p. 34 |
The Complete WinMain Listing | p. 35 |
The Line-by-Line Analysis of WinMain | p. 36 |
The Complete WinProc Listing | p. 42 |
The Line-by-Line Analysis of WinProc | p. 44 |
Converting the Program to Execute Under Windows CE | p. 50 |
Modifications to the WinMain Element | p. 50 |
Discussion of WinMain Modifications | p. 51 |
The Annotated Code Listing for the Modified WinMain Element | p. 52 |
Modifications to the WinProc Element | p. 53 |
Discussion of WinProc Modifications | p. 54 |
The Annotated Code Listing for the Modified WinProc Element | p. 55 |
Analyzing the Design of the Simple Windows Program | p. 56 |
Summary | p. 60 |
Sample Programs on the Web | p. 60 |
Execution Instructions | p. 61 |
A Minimal, Easily Tested Pocket PC Program | p. 63 |
User Interface of the Minimal Pocket PC Program | p. 64 |
Design of the Minimal Pocket PC Program | p. 65 |
Introducing the Magic of Message Crackers | p. 69 |
Using the Message Cracker Wizard | p. 72 |
The Implementation of the Minimal Dialog Program | p. 77 |
Reviewing the Dialog and Menu Resource Templates | p. 77 |
Reviewing the WinMain Method in DlgMain | p. 79 |
Reviewing the DlgProc Method | p. 81 |
Studying the Message Handler Bodies | p. 83 |
Evaluating the Portability Utils Element | p. 86 |
Considering the DataMgr Element | p. 90 |
Using the Dialog Program to Initialize a Desktop Program | p. 91 |
Retargeting the Desktop Program to the Pocket PC | p. 92 |
Analyzing the Design of the Minimal Dialog Program | p. 94 |
Summary | p. 95 |
Sample Programs on the Web | p. 96 |
Execution Instructions | p. 96 |
Drawing and Painting | |
Drawing Images Using Graphics | p. 101 |
Graphical User Interface for a Simple Animation Program | p. 102 |
Drawing Images Using Graphics | p. 104 |
Using Drawing Toolkits | p. 104 |
Available Pen and Brush Styles | p. 106 |
Drawing Operations | p. 108 |
Clipping Operations | p. 109 |
Displaying the Image | p. 111 |
Forcing a Repaint of Your Application Window | p. 113 |
Using Timers in Your Application | p. 114 |
Using Encapsulation in an Application Design | p. 116 |
The Implementation of the Simple Animation Program | p. 120 |
Reviewing the DlgProc Method | p. 122 |
Studying the Message Handler Bodies | p. 123 |
Evaluating the DrawOps Element | p. 129 |
Analysis of the Effectiveness of the Encapsulation | p. 133 |
Summary | p. 133 |
Sample Programs on the Web | p. 134 |
Execution Instructions | p. 134 |
Implementing a Drawing Program | p. 137 |
Drawing Objects Using Rubber Banding | p. 139 |
Adding Message Handler Declarations and Handler Bodies | p. 144 |
Declaring the Static Variables Necessary to Support Dragging | p. 145 |
Implementing the Message Handler Bodies to Manage Drawing | p. 146 |
Modifying the Paint Handler to Support Erasing and Drawing | p. 149 |
Typing and Echoing Characters | p. 151 |
Implementing the Text Function Encapsulation | p. 158 |
Adding Variables to Maintain Text Entry State and a Text String | p. 160 |
Defining the Custom WM_POSITIONCARET Message | p. 161 |
Incorporating the Handling of Character-Related Messages | p. 163 |
Implementing the WM_KEYDOWN Message Handler | p. 164 |
Updating the WM_LBUTTONDOWN Message Handler | p. 167 |
Implementing the WM_CHAR Message Handler | p. 169 |
Implementing the WM_POSITIONCARET Message Handler | p. 171 |
Displaying a Text String in the WM_PAINT Message Handler | p. 171 |
A Short Critique of This Design/Implementation Approach | p. 173 |
Summary | p. 173 |
Sample Programs on the Web | p. 174 |
Execution Instructions | p. 174 |
Image Processing Using Bitmaps | p. 179 |
Implementing an Image-Processing Program | p. 181 |
Introducing the Graphical User Interface | p. 181 |
Analyzing Program Operations and Organization | p. 186 |
Implementing the Image-Processing Program | p. 192 |
Developing a Splash Screen Using BitmapUtilities | p. 205 |
Introducing the Graphical User Interface | p. 205 |
Describing the Internal Operation of the Program | p. 207 |
Implementing the Splash Screen Program | p. 208 |
Performing Bitmap Animation Using BitmapUtilities | p. 212 |
Introducing the Graphical User Interface | p. 212 |
Implementing the Bitmap-Animation Program | p. 214 |
Preparing ActiveSync for the Programs in This Chapter | p. 221 |
Summary | p. 224 |
Sample Programs on the Web | p. 225 |
Execution Instructions | p. 225 |
User-Friendly Applications in Small Spaces | |
Using an Effective Software Design | p. 233 |
Developing the Design Rationale | p. 235 |
The Final Layered Design | p. 249 |
Implementation Process | p. 251 |
Actual Code Analysis | p. 252 |
Implementing the Data Type Manager Encapsulation DrawObjMgr | p. 253 |
Implementing the Object Manager Encapsulation DefaultMgr | p. 256 |
Adding Variables and Access Methods to the Existing DataMgr | p. 258 |
Adding a CaretMgr Functional Encapsulation | p. 259 |
Implementing the UserInputMgr to Process Messages | p. 260 |
Modifying Handlers in DlgProc to Interact with UserInputMgr | p. 266 |
Enhancing the Main Menu Using a Pop-up Submenu | p. 268 |
Updating the WM_COMMAND Handler to Process Menu Items | p. 274 |
Adding a WM_INITMENUPOPUP Handler to Check the Default | p. 275 |
Some Comments on the Design and the Implementation | p. 276 |
Summary | p. 277 |
Sample Programs on the Web | p. 277 |
Execution Instructions | p. 278 |
Using Intrinsic Controls in a Graphical User Interface | p. 281 |
Using Intrinsic Controls in an Application | p. 282 |
An Overview of the Intrinsic Controls | p. 284 |
Implementing with the Intrinsic Controls | p. 289 |
An Important Portability Issue | p. 293 |
Using a Group of Controls to Implement User-Friendly Input | p. 294 |
Utilizing a Scroll Bar and a Text Buddy | p. 295 |
Incorporating a User-Friendly Scroll Bar Control | p. 299 |
Validating Direct User Inputs into the Text Buddy Window | p. 304 |
Summary | p. 305 |
Sample Programs on the Web | p. 306 |
Execution Instructions | p. 306 |
Developing a Complex User Interface | p. 311 |
A Drawing Program with a Complex User Interface | p. 312 |
Using Bitmap Buttons to Support Areas of the Hierarchy | p. 318 |
Steps for Using the Bitmap Buttons Software Element | p. 318 |
An Example of the Steps for Using Bitmap Buttons | p. 318 |
An Overview of the BitmapButtonMgr Implementation | p. 324 |
Using Tab Pages to Support Categories of the Hierarchy | p. 326 |
Steps for Using the TabPageMgr and Tab Templates | p. 326 |
An Example of the Steps for Using TabPageMgr | p. 327 |
An Overview of the Tab Pages Templates Implementation | p. 334 |
A Final Consideration for Developers | p. 336 |
Summary | p. 336 |
Sample Programs on the Web | p. 337 |
Execution Instructions | p. 337 |
Maintaining Application Parameters | p. 339 |
Using a Layered Design for Managing Parameters | p. 342 |
Choosing a Target Storage Format | p. 345 |
Steps to Tailor a Parameter Database Manager | p. 347 |
An Example of Tailoring a Parameter Database Manager | p. 348 |
Define the Record Organization of the Parameter Database | p. 348 |
Define Default Records for Each of the Parameters | p. 349 |
Use Methods to Interact with the Parameter Database | p. 350 |
A Code Walk Through the Layers | p. 352 |
Targeting the Bottom Layer to a Destination | p. 354 |
Summary | p. 355 |
Sample Programs on the Web | p. 356 |
Execution Instructions | p. 356 |
Systems Programming | |
Multithreaded Applications and Synchronization | p. 361 |
The Use and Abuse of Threads | p. 362 |
States of a Thread | p. 364 |
Scheduling a Thread for Execution | p. 366 |
Thread Priorities and Priority Management | p. 367 |
Demonstrating the Effect of Thread Priorities | p. 368 |
An Introduction to the Synchronization Problem | p. 370 |
A Solution to the Synchronization Problem | p. 374 |
Some Detailed Design for a Review | p. 376 |
Implementing Threads with Synchronization | p. 378 |
Creating the Threads | p. 379 |
Implementing the Main Thread | p. 379 |
Implementing a Child Thread | p. 379 |
Creating the Synchronization Objects | p. 380 |
Waiting for Step Completion | p. 381 |
Signaling Step Completion | p. 382 |
Waiting for the Child Threads | p. 383 |
Summary | p. 384 |
Sample Programs on the Web | p. 384 |
Execution Instructions | p. 384 |
Utilizing COM Components | p. 389 |
Component Object Model Architecture | p. 390 |
Creating COM Components with ATL | p. 403 |
Create an ATL COM Object Using the ATL COM AppWizard | p. 404 |
Insert a New ATL Object Using the ATL Object Wizard | p. 405 |
Add Application Methods Using the Add Method to Interface Wizard | p. 409 |
Generate the Bodies of the Application-Specific Methods | p. 410 |
Analyzing the ATL COM Component | p. 412 |
A Class Declaration | p. 412 |
The Class Body | p. 414 |
Global Methods and Objects | p. 415 |
An Interface Definition Language File | p. 417 |
A Registry Script | p. 418 |
Creating a COM Client | p. 419 |
Establishing the COM Object Interface | p. 421 |
Programming the COM Object Interface | p. 421 |
Registering a COM Server on a Pocket PC | p. 424 |
Summary | p. 425 |
Sample Programs on the Web | p. 426 |
Execution Instructions | p. 426 |
Index | p. 431 |
Table of Contents provided by Syndetics. All Rights Reserved. |