Mobile applications generally have fewer features and simpler user interfaces. Simply omit whole sizers, static lines and controls in your dialogs, and use comboboxes instead of listboxes where appropriate. You also need to reduce the amount of spacing used by sizers, for which you can use a macro such as this:
#if defined(__WXWINCE__) #define wxLARGESMALL(large,small) small #else #define wxLARGESMALL(large,small) large #endif // Usage topsizer->Add( CreateTextSizer( message ), 0, wxALL, wxLARGESMALL(10,0) );
There is only ever one instance of a Windows CE application running, and wxWidgets will take care of showing the current instance and shutting down the second instance if necessary.
You can test the return value of wxSystemSettings::GetScreenType() for a qualitative assessment of what kind of display is available, or use wxGetDisplaySize() if you need more information.
You can also use wxGetOsVersion to test for a version of Windows CE at run-time (see the next section). However, because different builds are currently required to target different kinds of device, these values are hard-wired according to the build, and you cannot dynamically adapt the same executable for different major Windows CE platforms. This would require a different approach to the way wxWidgets adapts its behaviour (such as for menubars) to suit the style of device.
See the "Life!" example (demos/life) for an example of an application that has been tailored for PocketPC and Smartphone use.
Note: don't forget to have this line in your .rc file, as for desktop Windows applications: