Maximize MenuMinimize Menu

 

 

Trajecto's Win32 API Programming Tutorial for Pocket PC

Anatomy of a Windows Program

Windows CE
The Windows CE operating system is based on the Win32 application programming interface (API). The fundamentals of programming for Windows CE closely parallel programming for Windows 98, Windows NT, and Windows 2000. As with the other Windows operating systems, Windows CE is an event-driven programming model. A Windows CE-based program receives messages, interprets the messages, and acts on the messages.

A Windows CE program has one or more Windows that receive and process messages in a message loop. The Windows can be visual or, for an application that does not require a user interface, nonvisible. Each window has a window handle (hwnd) associated with a message processor that handles the messages for the window. You can also use the window handle to call any related function.

Like any other Windows-based program, a Windows CE program has two primary functions, a message processor (usually called WndProc) and WndMain, which provides an entry point to the program. The WndProc function processes messages for the Window. In general, an application processes only those messages that are relevant to it, and passes other messages back to the operating system. In addition to being the primary message process for an application, WinMain also handles initialization and shutdown.

When developing a program for Windows CE, you must first determine the hardware platform and processor on which your program is going to run. You must also know the hardware configuration for which you are developing the program. The platform and processor will be determined by the SDK you are using. Because Windows CE is a modular operating system, an original equipment manufacturer (OEM) chooses specific modules and components to configure Windows CE devices. You may have to consider, for example, the memory that will be available to your application.

Pocket PC
A Pocket PC application is still a Windows application, so it has a message loop, a main window, and window procedures. However, some new requirements do change the design a bit. First, a Pocket PC application must make sure that only one copy of itself is running at any one time. The operating system doesn't ensure this-that is the application's job. Second, instead of using a command bar-as do other Windows CE applications-Pocket PC applications use the menu bar. In many ways, the menu bar acts like an updated command bar, but it does have some peculiarities. A Pocket PC application should not have a Close button, an Exit command, or a Close command in its menus. This is because PDA users don't use applications; they use their PDAs. (The user interface gurus that work on this stuff have decided that users would rather not know when a particular application is running or not.)

 

 

Win32 API Vulnerabilities
http://security.tombom.co.uk/shatter.html

Radiosity Games
See our new game site

 

©Copyright TrajectoryLabs.com. All Rights Reserved.