Development: wxWinCE

From WxWiki
Jump to navigation Jump to search

About the Windows CE Port

This is a wxWidgets port to the Windows CE, or Pocket PC, platform. Essentially it's some #ifdefs in the wxMSW code plus some additional classes, such as a new wxToolBar class that encapsulates commandbar functionality.

The port was started by Marco Cavallini and has been revived by Julian Smart in July 2003 and you can see a screenshot here: [1]. SmartPhone menus handling, native SmartPhone wxChoice, several adjustements, project files for demos and samples of wxWidgets package were created by Wlodzimierz 'ABX' Skiba. Build infrastructure for this port has been done by Vaclav Slavik and Vadim Zeitlin has contributed wxImage/wxBitmap implementation and some fixes elsewhere. Thanks to Robert Roebling for motivating us to do it :-)

See the wxWinCE section in the reference manual for a guide to programming with wxWinCE.

WinCE development configuration

Before thinking about wxWinCE development, choose your target WinCE version and SDK dedicated to your hardware. Consider guide about order of installation described in appendix "Recommended Installation Order for Development Tools for Mobile Applications"

Done so far

  • created project file with appropriate files for wxWidgets library and Minimal sample.
  • miscellaneous #ifdefing to make it compile.
  • added net.cpp, crt.cpp, time.cpp to src/msw/wince to stub out/replace some missing functionality.
  • wxFrame::SetMenuBar is handled as:
    • implemented part of wxToolBar (src/msw/wince/tbarwce.cpp) using commandbars. When wxFrame::SetMenuBar is called a wxToolBar is created.
    • button activated wxMenu in case of SmartPhones
  • adjustments of sources and project files for demos: Life!, Bombs and wxPoem
  • wxWinCE project generator


There's plenty to do before this port is complete, including the following.

  • finish wxToolBar, including hacking wxComboBox so that it knows whether it's in a wxToolBar.
  • bitmap handling, especially implementation of wxDIB. For help see [2]
  • What to do about the lack of RegisterDragDrop, RevokeDragDrop under eVC4. Do we simply need to dynamically load these functions from ceshell.dll, since ceshell.lib no longer exists?
  • time/date handling (Marco Cavallini Aug-2003)
  • DoDrawArc implementation (done by Peter Lenhard 2003, but untested on CE. Does it work well?)
  • rich edit and rich ink support
  • wxSetLocale
  • printing -- PrintDlg is deprecated (but still useable)
  • WinCE-specific APIs, e.g WM_HIBERNATE, GetPowerStatusEx
  • wxSync class or similar for data transfer/synchronisation


  • adjust file system to info about permanent path [3]
  • replace wxFileDialog with a simplified version;
    • perhaps just a list of files as suggested in "Developing an Effective Smartphone User Interface" [4];
    • all docs must go in \My Documents;
    • some hint about look in "Working with files on Smartphone devices with the .NET Compact Framework" [5];
    • tgetfile is a nice looking dialog [6];
    • For now I have replaced it with code to display a text box, which will probably be too much for the little screen.
  • similarly, replace wxColourDialog with simplified version
    • Orneta Paint has example of small color selector [7];
  • cut other, generic dialogs down to size for smaller screen
  • wrap spinner control
  • reimplement wxListBox, wxComboBox, wxChoice in terms of spinner control since these are not supported in SmartPhone (wxChoice done so far)
  • optimize as much as possible for absence of touch screen (won't future phones become more like PocketPCs though?)

Useful links

  • Pocket PC developer network: [8]
  • SmartPhone developer network: [9]
  • Microsoft Mobile Developer site: [10]
  • Other links: [11]
  • Microsoft embedded: [12]
  • Survey of European PDA and Smartphone growth in Q2 2003: [13] This indicates that Windows CE is still a small fraction of the European market, and the leaders are Nokia and Palm. Anyone have figures for the rest of the world, particularly the U.S.?