FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Architecture & Design
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
February 01, 2002
An Unexpected Release

Developing software for the Pocket PC was once an arduous task, but Microsoft's Embedded Visual Tools has come to the rescue-easing the programming pain once found in the world of Windows CE PDAs.

(Page 1 of 2)

February 2002: An Unexpected Release

Dana Cline

I had owned my Pocket PC for about eight months, but was unable to develop software for it. The only way to do so required Visual Studio as well as the CE SDK, and could only be done using Visual C++. I had pored over the SDK documentation, but had given up, disappointed that developing homegrown software for my Pocket PC was so difficult.

That all changed when, without fanfare, Microsoft released Embedded Visual Tools in January 2001. The most amazing thing was that this product, unlike Microsoft's other development tools, was free. It did require a 304Mb download, but it was also available on CD-ROM for the cost of shipping.

Embedded Visual Tools consists of the Visual Studio development environment, which runs on a standard Windows PC, and versions of Visual Basic and Visual C++ with features targeted for use on the entire family of Windows CE devices—Handheld PC, Palm-size PC and Pocket PC. Visual C++ programs compile to machine code for a specific processor family, while Visual Basic programs compile to an intermediate code that can run on all supported processors. Visual Basic is typically used to develop software that has a user interface, while Visual C++ is designed to allow easy creation of device drivers, ActiveX components and other "behind the scenes" software.

Familiar Feel

[click for larger image]

The embedded version of VB looks like standard VB, but with a new dockable palette of tools specific to Windows CE. Anyone used to VB will feel instantly at home.

Visual Basic
Embedded Visual Basic looks and acts like its desktop counterpart. When creating a new project, you have a choice between a "formless" application (one without a visual interface) and a regular "form" application (the more typical choice). One noteworthy difference from desktop VB is that all forms are created at the same size as the screen and are not resizable, a necessary result of Windows CE's design. The screen, and therefore, form size are determined by the WinCE SDK version you're targeting (for example, WinCE 3.0 has a 240x320 display).

All of the standard visual features are there—an abundance of toolbars (dockable or free-floating), project and properties windows, an immediate window, a tool palette, and windows for forms and code. Anyone familiar with Visual Basic will feel instantly at home.

One thing missing from Embedded Visual Basic is the wealth of ActiveX controls found in the Visual Studio version. However, Embedded VB does contain standard controls for the buttons, lists, text boxes and common dialogs, along with image, image list and picture box controls. Fortunately, Microsoft also provides a menu bar, grid and tree view control, allowing you to create modern-looking applications. Since Windows CE has a different type of file system, there's a control for that. Finally, the collection is rounded out with a WinSock control, allowing easy access to network features.

Long ago, Visual Basic acquired a sort of cult status, and many long-time VB developers are switching to Embedded Visual Basic. One of the results of this migration is a proliferation of Web sites with tutorials and white papers. The tutorials generally concentrate on one particular technique, with example source code. A good example of such a site is www.devbuzz.com.

Visual C++
Embedded Visual C++ is, well, very similar to Visual C++. It has the standard interface, toolbars, debugging features and a set of wizards to get you started.

It was also designed to leverage the knowledge of existing Visual C++ developers. All of your old friends are here: MFC (Microsoft Foundation Classes), ATL (Active Template Library) and the API. MFC was Microsoft's first framework and can be used to create applications that use the document and view concept. ATL can be used to develop ActiveX controls (for those VB user interfaces). And, if none of those suit you, you can fall back on the tried and true Windows API. There are, of course, differences between the Windows CE API and other 32-bit Windows APIs, but Windows CE did manage to pack most of the old APIs into its slim footprint.

Coming Attractions

The emulator window shows you how your application will look on the targeted Windows CE device, cutting down on time spent uploading and testing.

Features
Embedded Visual Tools offers the same debugging features you would find in the Visual Studio product, but takes it one step further. If you use Windows NT or Windows 2000, you can use the included emulator to completely test your application without ever downloading it to the CE device. Another tool, the Remote Display Control, available separately from the Microsoft Web site (again, free of charge) allows you to control your CE device from your desktop, offering a complete round-trip solution.

Standard Visual Studio features are available in remote versions, allowing you to spy, edit registry entries, view files, view processes or walk the heap on your attached CE device.

One difficulty in distributing Windows CE applications is the necessity to install them from a desktop to the device. An Application Install wizard makes it easy to create a single Windows executable program that will install files that you specify on the desktop system as well as sending other specified files to the attached device. Since many Windows CE applications have corresponding desktop applications, this install builder takes the sting out of installing both.

CE Limitations
Due to various CE limitations, software development for that platform is different than for the Windows desktop. First, there is usually a fixed display model. You're limited there; plus you're limited by the physical memory and storage models. For instance, Pocket PC displays are 240x320, physically. Some software, however, can simulate up to 640x480 VGA resolution but not all programs can utilize that extra space. Other CE devices (especially custom ones) may have different hardware, including no display at all.

The memory and storage models merge, as your storage is your memory. Programs don't load per se—they're simply executed directly from the memory that they're stored in. On the lowest level, your programs and their data are all held in an object store, which is held in RAM. Ancillary storage consists mostly of Compact Flash cards.

The storage model is noticeable: For instance, there are no File I/O commands in VB. Instead, all file access is done through the File System ActiveX component. And while CE itself is based on Unicode, the Active X can read Unicode, but not write it. Fortunately, you can overcome that limitation by dropping down to the API itself.

A Welcome Change
The first version of Visual Basic brought painless Windows programming to thousands of programmers overwhelmed with the complexity of C and the Windows API. Similarly, Embedded Visual Tools eases the programming pain once found in the world of Windows CE personal digital assistants. The result has been a surge of available programs—everything from personal productivity tools to vertical market business solutions to various add-in components. Thanks to the RAD environment and CE emulation, almost any type of program can be prototyped and proven rapidly. When a coworker needed a versatile stopwatch program, I was able to put one together in a matter of hours. Thanks to advances like wireless networking and database synchronization, corporations are finding that an entire new class of applications can be created in a short time that solve business problems in entirely new ways.

Microsoft has planned for the future, too. Once the Visual Studio .NET product ships, Microsoft will offer a version of C# for the CE devices. Similarly, Microsoft will offer an SDK for the new Pocket PC 2002 operating system. Both will snap into the Embedded Visual Tools IDE.

 

Embedded Visual Tools 3.0
Microsoft Corp.
One Microsoft Way
Redmond, WA 98052-6399
Toll-free: (800) 426-9400
Online: www.microsoft.com

Pricing Scheme:

Free if downloaded from Microsoft

Technical Requirements:

Windows 98se, NT or 2000
Pentium 150, 32MB RAM, SVGA, 720MB disk space for full install

RATING: **** The Rate Sheet
Pros:
  1. Windows CE support is available via MFC, ATL or WIN32 API.
  2. Installation software allows distribution for both desktops and PDAs.
  3. There is support for Unicode, ADO synchronization and ActiveX.

Cons:
  1. The help file is targeted at VC++ developers.
  2. More controls would be useful.
  3. There's no built-in support for unusual display resolutions.

1 | 2 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK