All Forums
 Microsoft Windows CE
 CE Downloads and Documents
 Setting the splash and CE background color
 Forum Locked  Topic Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

jjoseph

47 Posts

Posted - 21 Apr 2008 :  13:36:48  Show Profile
Many Eurotech products allow you to define the bitmap that will be displayed on the screen when the system powers up.

What You'll Need to Do

There are several issues you may face in performing this task.
  1. In many cases, the bitmap you use may not fill the entire screen. To create a finished look for the boot screen, fill the screen using a background color that matches the edges of your bitmap.

  2. Converting 24-bit BMP to 16-bit. Many Eurotech processors have 16-bit graphic controllers. While the boot code and Windows CE can correctly display your 24-bit bitmap file, you will have to perform the color conversion yourself for the boot background color.

  3. If your application exposes the Windows CE desktop to your end users, you must programmatically change the background color using the SetSysColors() API.

The following steps walk you through the process of setting the background color.

Setting the Background Color for Boot

To set the splash screen background color and Windows CE desktop background color perform the following steps:

1. First, determine the desired background color by reviewing the 24bit per pixel bmp file to be used as the splash screen and CE desktop image. You can use the MSPaint.exe program on your PC to determine the RGB values for the desired background color.

2. Convert the RGB color from step 1 into a 16 bit color. This is done by converting the RGB values to hexadecimal and taking the high order bits in the pattern 5:6:5. That is 5 bits of red, 6 bits of green and 5 bits of blue.
Example:
RGB(75, 144, 207) 
R=4B, G=90, B=CF
R=0100 1011, G=1001 0000, B=1100 1111
5:6:5 = 01001 100100 11001 = 0100 1100 1001 1001 = 0x4C99


3. Update adsload.hwt file to include the calculated background color. See topic 2297 for information on setting the background color.

Setting the Background Color for the Windows CE Desktop

4. Update your ADSLOAD.EXE or aplication to include the following code updated for your color:
#define BACKGROUND_COLOR RGB(75, 144, 207)
int aiElements[1];
DWORD aColors[1];
aiElements[0] = COLOR_DESKTOP;
aColors[0] = BACKGROUND_COLOR; // Desired colors
SetSysColors(1, aiElements, aColors);


5. Load your device with the new adsload.hwt, adsload.exe and adsload.bmp files, then boot Windows CE.
  Topic  
 Forum Locked  Topic Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.02 seconds. Snitz Forums 2000