Customizing Common Controls (Windows CE 5.0)

Send Feedback

You can customize a subset of the common controls when you create a skin. To customize a common control, change the code contained in the appropriate file in the %_WINCEROOT%\Public\Common\Oak\Drivers\Skinnableui\Commctrl directory. Each control corresponds to a C++ class. You customize the UI by changing the implementation of the methods that these classes contain.

The following table shows the common controls that you can customize, the name of the class that contains the methods that you must implement to customize the control, the file that contains the implementation of those methods, and which elements of the control can be customized.

Common control Class File name Customizable element
Header control HeaderView_t Headerview.cpp Position of the header bitmap and text.

Border of buttons that the header control contains.

Height of the header control.

Progress bar ProgressBarView_t Progressview.cpp Code used to draw the entire progress bar.
Rebar RebarView_t Rebarview.cpp Gripper.

Spacing between items in the rebar.

Tab control TabView_t Tabview.cpp Code for drawing the tab control.
Toolbar ToolBarView_t Toolbarview.cpp Location at which a button image on the toolbar is drawn when the user presses or checks the corresponding button.

Border of buttons on the toolbar.

Drop-down arrows on the toolbar.

Bounding rectangle of the face of a button on the toolbar.

Amount of horizontal and vertical space that the border and sides on a button on the toolbar occupy.

System-defined bitmaps displayed on toolbar buttons.

Trackbar TrackBarView_t Trackbarview.cpp Channel, focus rectangle, thumb, and tick marks for the trackbar.
Up-down UpdownView_t Updownview.cpp Style for the buttons, borders, and the bounding rectangle.

**Note   **You can customize a command band by modifying the rebar and toolbar.

Customizing Window Controls

You can customize a property sheet by adapting its tab controls.

You cannot customize the following common controls by using a skin:

  • Date and time picker
  • Image list
  • List view
  • Month calendar control
  • Status bar
  • ToolTip control
  • Tree view

The %_WINCEROOT%\Public\Common\Oak\Drivers\Skinnableui\Commctrl directory also contains the Commctrlview.cpp file, which implements the CommCtrlView_t::Init method. You can implement this method to perform any one-time initializations that you need when customizing the common controls.

After you make changes to the code, you must make the following changes to the environment variables in the Platform Builder build system before you create a run-time image.

  • Set REPLACE_ROOT to the path of the file that contains the replaced or modified code.
  • Set REPLACE_MODULES to commctrl.

Depending on whether or not resource files are associated with the library file, set one of the following environment variables.

  • If the list of replacement libraries have resource files associated with them, set COMMCTRL_REPLACE. The following code example shows the syntax. COMMCTRL_REPLACE=commctrlviewxp. This will include commctrlview.lib and commctrlview.res.
  • If the list of replacement libraries do not have resource files associated with them, set COMMCTRL_REPLACE_COMPONENTS. The following code example shows the syntax.COMMCTRL_REPLACE_COMPONENTS=commctrlview. This will include commctrlview.lib only.

See Also

Working with Common Controls | Creating a Skin | How to Customize the Appearance of Common Controls

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.