Here are some sample Windows CE programs to help you with your Windows CE software development projects. These samples are all written in C/C++ using the Win32 API, which gives you the most control over the size and speed of your executable file.
A standard program for first-timers is "Hello World". This particular program says hello in several different ways: (1) In the title bar of the application's main window, (2) In the client area of the application's main window, and (3) In a message box when the user clicks the mouse (or taps the screen on systems with touch screens) in the client area.
This program was written to accompany a talk given by Paul Yao at the summer edition of the Embedded Systems Conference in June, 1999.
Download now
(hello.exe is a 78KB self-extracting
file)
This program demonstrates the basics of using the HTML Viewer Control. This control enables the display of basic HTML text data (HTML version 3.2, roughly equivalent to Internet Explorer 3.x). This control is the brains behind PEGHELP, which is the Windows CE help engine.
The sample program, HTMLVIEW, creates a simple HTML viewer control. It also creates a second window to display the notifications that the control sends its parent window. The notifications are necessary to allow for the display of non-text data, such as JPEGs, and GIFs. A notificiation also gets sent when the user clicks on a hyperlink. On receipt of that notification, the parent window must parse, resolve, and handle the link by fetching the data and updating the contents of the HTML viewer control.
This program was written to accompany a talk given by Paul Yao at the Windows CE Developer Conference held in Denver, Colorado in June, 1999.
Download now
(htmlview.exe is a 99KB self-extracting
file)
A common use of Windows CE is for mobile workers to collect data. This sample lets a mobile worker log starting and stopping times for billable project work.
Like the other samples on this page, TIMELOG was written using the Win32 API. It shows the creation of a simple dialog box to serve as the program's main window. It shows a simple strategy for accommodating different sizes and shapes on different display screens. For example, a Handheld PC might have a screen that is 640x240 pixels. By contrast, the size of a Palm size PC screen is 240x320. Not only does the represent half the pixels, but the orientation is vertical rather than horizontal. This program also shows the use of the Windows CE database APIs, which are used for the storage of time data.
This program was written to accompany an article that appears in the July/August 1999 edition of the Visual C++ Developers Journal.
Download now
(timelog.exe is a 104KB self-extracting
file)
This Windows CE tool lets you uncover the specific subset of the Win32 API that is supported on a given Windows CE platform. It lets you check by system library, and it can also query all the libraries in the system at once.
Many Win32 programmers wonder about the exact subset of the Win32 API that is supported on Windows CE. Whether you are writing a new Windows CE program from scratch, or plan to port existing applications from desktop Windows to CE, the issue is an important one.
The issue is complicated by several factors. One is the fact that Microsoft has updated Windows CE quite rapidly, and so there are currently devices for versions 2.0, 2.01, 2.10, and 2.11 on the market. A second complicating factor is that Microsoft has defined three major "targeted" platforms (each of which has its own version number!). These three platforms are the Handheld PC (a.k.a. "HPC"), the Palm size PC, and the AutoPC. A third factor is that third-parties can create their own, custom versions of CE that can contain as much or as little of the Win32 API as a platform creators wishes.
This program attempts to solve this problem by querying the system for all known Win32 functions (up through Windows CE 2.12), and indicating which are supported and which are not. What this tool can show you in a few minutes can save you months and months of development time!
This program was written to accompany a talk given by Paul Yao at the Windows CE Developer Conference held in Denver, Colorado in June, 1999.
Download executable files now (supports ARM, MIPS, SH3, SH4, and x86)
(cefun.exe is a 161KB self-extracting file)
Download HP620LX executable now
(cefun.exe is an 80K executable file for the HP 620LX only)
Access source code (password required)