Programming Windows CE

Programming Windows CE is for the embedded programmer who has little if any Win32 experience or has programmed Windows using MFC or another class library.  Students will learn Windows programming from the Windows CE perspective. The class starts with an introduction to Windows application architecture followed by a tour of the basic Windows API with a discussion of how these functions apply to the embedded environment.  The class then progresses to cover areas specific to Windows CE including the internal operating system architecture.

When you have completed the seminar, you will know the techniques necessary for writing good Windows CE applications as well as the pitfalls to watch out for.  The class covers the same Windows CE content as Windows CE for Win32 Programmers, but extends the discussion over an extra day to introduce the techniques used for programming directly to the Win32 API.

Introduction to Windows CE

Although part of the Windows operating system family, Windows CE has a unique history and design.  This section introduces Windows CE and provides background for the remainder of the class.  Coverage includes the history of Windows CE, its general design concepts as well as an overview of the design and development process for companies using Windows CE.

Hello Windows CE

Windows programs are architected differently from standard command line applications.  Hello Windows CE introduces the windows program architecture to programmers unfamiliar to Windows programming.  The

Windows and Controls

The key to Windows user interface programming is understanding how the system organizes and manages windows and controls.  This section teaches how programs create and manage windows, dialog boxes, and controls.  Since Windows CE devices typically have small screens, this talk covers how to design dialog boxes for those small display situations.

 Lab1:  Write a simple Windows CE application.  Explore how the message loop interacts with the code in the window procedure.  Explore the tools available for programming Windows CE applications.

Text and Graphics

Windows programs use the Graphics Device Interface to drawing shapes and text onto the screen.  This section discusses how to draw lines and shapes, the use of brushes, pens and bitmaps, and how to create and use fonts to draw text.

Keyboard and stylus

The keyboard and stylus, or mouse, provide the user input for Windows CE systems.  This section covers how to field and interpret user input from these input devices.

 Lab2:  Write a Windows CE application that fields mouse clicks and draws lines on the display from one point to another.  Interpret a specific key press to clear the screen.

Kernel Programming

The Windows CE kernel implements a subset of the Win32 API, but its internal design is completely different from any other Windows operating system.  In this section, the internal architecture of Windows CE is presented and how it affects application development.  The standard Windows memory API is also discussed with special emphasis on how embedded programs have to treat memory management differently from standard PC applications.

 Lab3: Write a Windows CE application and write routines that explore how the operating system allocates and manages memory using the difference memory functions available under Windows CE.

GWE and the Common Controls

The Graphics, Windows, and Event subsystem is the Windows CE version of the GDI, User, and System subsystems known to desktop Windows programmers.  This section covers how the GWE differs from its desktop counterparts.  The common control library is also covered in this section with emphasis on controls specific to Windows CE.

Lab4: Create a Command bar control that contains menus, buttons and a combo box.

Files and Databases

Windows CE implements a native database API that is unique among the Windows operating systems.  This section covers how to use this API.  The file system API is covered including the differences between the desktop version of the file system API and the Windows CE implementation.

Lab5:  Write a Windows CE application that creates and manages a database using the Windows CE database API

Interprocess Communication

This section covers how to implement communication between processes under Windows CE.  All different aspects of interprocess communication are covered from simply sending messages between windows to asynchronous interprocess communication using threads to directly access different processes.

Lab6:  Explore different methods of interprocess communication including memory mapped files, Events, and other constructs.  Explore how Windows CE isolates processes from one another and how this isolation can be bypasses when necessary.

Notifications

The notification API is a Windows CE unique that allows applications to be notified when system events such as driver load and unload occurs in the system.  Other notifications launch applications and notify users.  This section covers how to create notifications and how notifications are useful in specific situations.

RAPI

RAPI is the remote API, a simplified RPC scheme that allows PC programs to call functions on an attached Windows CE device.  RAPI provides the low level foundation for the Windows CE installer and other programs that remotely control Windows CE systems from a personal computer.  This section discusses using RAPI including how to create custom RAPI functions that provide complete flexibility for PC applications interacting with attached Windows CE devices.

Lab7:  Write PC programs that use RAPI to call functions on a Windows CE device.  Write RAPI DLLs that can be called from the PC in both block and stream modes

 
© Copyright 2003. Boling Consulting Inc.