Skip to main content
Email Password   helpLost your password?

Sample Image - CeColourPicker.jpg

Introduction

This is a port of Chris Maunder's Office 97 style Colour Picker control[^] to Windows CE (PocketPC 2002). The code was adapted using the preprocessor macro _WIN32_WCE to enable transparent compilation in both eVC++ 3.0 and VC++ 6.0.

Porting

Here are the main points of the port.

Compatibility between CE and Desktop versions has been maintained through the precompiler, using the _WIN32_WCE #define.

The CE version of the popup is statically allocated in CColourPicker because CE does not support the WM_NCDESTROY message, making it impossible to dynamically delete the popup. This required the addition of a number of property set methods.

The popup is dismissed when the user clicks the button a second time, assuming a selection ended with cancel behavior.

The custom text button is not used to show up the CColorDialog. This class is not supported in MFC for the PocketPC 2002 SDK. One can still use the built in ChooseColor API, but the results are not very nice (see comment in the source code). The text changed to "Cancel".

WM_MOUSEMOVE is not used to make the color selection. CE has no mouse support and it would not be intuitive for a user to drag the pen just to start selecting the color. It has been replaced by WM_LBUTTONDOWN, and the handler code is the same.

This code has been tested in the PocketPC 2002 platform, compiles with no errors or warnings in Level 3 of eVC++ 3.0.

Revisions

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
Generalthe "X" button Pin
paraGOD
22:48 26 Dec '05  
GeneralRe: the "X" button Pin
João Paulo Figueira
0:39 27 Dec '05  
GeneralRe: the "X" button Pin
paraGOD
20:41 28 Dec '05  
GeneralRe: the "X" button Pin
João Paulo Figueira
0:08 29 Dec '05  
GeneralRe: the "X" button Pin
paraGOD
19:59 29 Dec '05  
GeneralCrashes under Windows Mobile 2003? Pin
gniemcew
15:51 25 Aug '04  
GeneralRe: Crashes under Windows Mobile 2003? Pin
João Paulo Figueira
23:17 25 Aug '04  
GeneralRe: Crashes under Windows Mobile 2003? Pin
gniemcew
6:25 26 Aug '04  
GeneralSource code for the example Pin
biswa
0:06 7 Mar '03  
GeneralRe: Source code for the example Pin
João Paulo Figueira
0:51 7 Mar '03  
GeneralRe: Source code for the example Pin
biswa
1:21 7 Mar '03  
GeneralRe: Source code for the example Pin
bm_masri
17:55 17 Nov '03  
GeneralRe: Source code for the example Pin
Daniel Jin
5:06 24 Apr '05  
GeneralGreat job! Pin
Daniel S.
6:59 31 Jan '03  


Last Updated 5 Feb 2003 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009