Tips and Traps for touch screen device development
- Use emulator to do early development.
- Always test your applications on a real device.
- There is no owner draw support for listbox and combobox on Windows CE. Use listview or menu as alternatives.
- Use custom draw feature on common controls if full owner draw is not needed.
- Always initialize pointers and check for NULL pointers, especially right after allocation.
- Use FILETIME for date/time comparisons.
- Note that Windows CE is a Unicode only environment. Use _T() to enclose string literals.
- To enable Windows Mobile style property dialog, both PSCB_GETVERSION and PSH_MAXIMIZE must be used. In the callback, returns COMCTL32_VERSION when handling PSCB_GETVERSION and specify PSH_MAXIMIZE in dwFlags field of PROPSHEETHEADER.
- Use CCM_SETVERSION to set the COMCTL32_VERSION version of common control.
- Use SHCMBM_GETSUBMENU message with wParam = 0 and lParam = uCmdID for getting a HMENU handle to a submenu on the command bar.
- When editing in-place on a TreeView, the edit control will send a WM_COMMAND message with IDOK to the parent window.
- Only common controls send GN_CONTEXTMENU.
- Use WC_SIPPREF control to enable SIP input and context menu support in edit controls.
- To find a storage card directory in root directory, look for a "file" with both directory and temporary attributes.
- Use secured version of string handling functions to avoid security problems such as buffer overflow.
Last Update: Apr 28, 2008

