Share via


Simple Shell Modifications

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

The following steps describe simple modifications you can make to your shell source code to verify that your source code is being built.

These modifications are broken into two groups:

  • Those that touch the Explorer source code
  • Those that touch the CEShell source code

Making changes in both areas proves that both major shell code branches are being built.

Before modifying any shell source code, see Setting Up the Source Files for a Custom Shell.

To change the Explorer taskbar

  1. In an editor, open %_WINCEROOT%\Public\Shell\Oak\<YourShellDirectory>\Explorer\Taskbar\Taskbar.cpp.

    The following table shows variables set in the constructor CTaskBar::CTaskBar. Experiment with the appearance and behavior of your shell by setting the values of these variables.

    Variable Description

    m_fIsSmallScreen

    The shell is set to QVGA mode if set to TRUE and standard display mode if set to FALSE.

    m_fExtraAppsButton

    A menu is displayed to provide access to more windows than can be displayed on the taskbar if set to TRUE and is suppressed if set to FALSE. Associated with QVGA mode.

    m_fShowClock

    The clock appears on the taskbar if set to TRUE and is hidden if set to FALSE.

    m_fShowDesktopButton

    The show-desktop icon appears on the taskbar if set to TRUE and is hidden if set to FALSE.

    m_bTaskBarSlide

    The taskbar slides to its hidden state if set to TRUE and jumps instantaneously if set to FALSE.

  2. Save the changes you made to Taskbar.cpp.

To change the CEShell background

  1. In an editor, open %_WINCEROOT%\Public\Shell\Oak\<YourShellDirectory>\Ceshell\UI\Desktopview.cpp.

  2. Change the desktop background color to lavender by making the following code change in CDesktopView::PaintBackground.

    // --- Original code commented out ---
    // ::FillRect(hdc, &rc, ::GetSysColorBrush(COLOR_BACKGROUND));
    // Explicitly set the background color.
    ::FillRect(hdc, &rc, ::GetSysColorBrush(RGB(230, 150, 230)));
    
  3. (Optional) Amend the OS version information displayed on the background to display the name of your shell by making the following code change in CDesktopView::PaintBackground.

    /* -- Original code commented out --
    ::wsprintf(wszVersion, L"Microsoft Windows \
    CE v%d.%02d (Build %d on %s) ", VerInfo.dwMajorVersion,
                 VerInfo.dwMinorVersion, VerInfo.dwBuildNumber,
                 TEXT(__DATE__));
    */
    // Display shell name along with Windows Embedded CE version information.
    ::wsprintf(wszVersion, L"<Shell Name> for Microsoft Windows \
               CE v%d.%02d (Build %d on %s) ",
               VerInfo.dwMajorVersion, VerInfo.dwMinorVersion,
               VerInfo.dwBuildNumber, TEXT(__DATE__));
    

    This modification can be useful when you need to distinguish between several custom shells.

    Note

    This code appears inside of a SHIP_BUILD block, so it only appears if the Enable Ship Build check box is cleared (which is the default state). For information, see OS Design Property Pages: Build Options.

  4. Save the changes you made to Desktopview.cpp.

See Also

Tasks

How to Customize the Shell

Reference

GetSysColorBrush
FillRect
Desktop Registry Settings

Other Resources

wsprintf
OS Design Property Pages: Build Options