Using the Resource Editors

The Visual C++ resource editors have been customized for Windows CE development, and include support for color images. Windows CE 2.0 supports 2 bits per pixel (2-bpp), 4 bits per pixel (4-bpp), and 8 bits per pixel (8-bpp) color devices, and can logically support 32 bits per pixel device-independent bitmaps (DIBs).

    To create a 4-color bitmap

In version 1.0 and version 1.01 of the Windows CE Toolkit for Visual C++ 5.0, color resources are converted to 4-color (2-bit, monochrome) during the linking process. Because version 2.0 of the Windows CE Toolkit for Visual C++ 5.0 supports 8-bit color, color resources do not have to be converted.

  1. On the File menu, click New.
  2. Click the Files tab.
  3. Select Bitmap File, and click OK

    -or-

    double-click Bitmap File.

  4. Create or import a bitmap.
  5. On the Image menu, click Convert to 4-Color

    -or-

    when using version 1.0 or version 1.01 of the Windows CE Toolkit for Visual C++ 5.0, build your project by clicking Build from on the Build menu (or by clicking the Build button on the Visual Studio toolbar). The bitmap will be converted to 4-color (2-bit, monochrome) during the linking process.

    To create a 4-color icon

  1. On the File menu, choose New, and open Icon File on the Files tab.
  2. On the Image menu, double-click New Device Image to add the two sizes of 4-color Windows CE image to your icon.

    To convert bitmap images between 4-color and standard formats

  1. Open the image in the resource editor.
  2. Double-click the empty area of the left image pane to open the Bitmap Properties dialog box.

  1. In the Colors drop-down box, choose a number. To convert the bitmap to a Windows CE 4-color image, select the number 4.

    To add the standard Windows CE font to a dialog box

  1. In the resource editor, open the dialog box.
  2. Double-click the dialog box image to open Dialog Properties.
  3. On the General tab, click the Font button, and select the PegasusDialog font.

    To create a scrollbar

  1. On the Visual Studio Insert menu, click Resource.
  2. Select Dialog, and click New

    -or-

    double-click Dialog.

  3. Drag the vertical or horizontal scrollbar control from the Controls toolbar onto the Dialog Editor Window.
  4. Make sure that any scrollbar you create for Windows CE is at least 57 inches long.

    To add a caption bar OK button to a dialog box

  1. In the resource editor, open the dialog box.
  2. Double-click the dialog box image to open Dialog Properties.
  3. Click the Extended Styles tab, and then click Caption Bar OK (WCE only). The OK button will not be visible in the resource editor, but will appear in the dialog box after the application is built.

Tip Windows® NT uses 16x15 bitmaps on its button bars, while Windows CE uses 16x16 bitmaps. Adjust the image size to 16x16 when designing images for use on Windows CE button bars.