Share via


GWES Registry Settings (Compact 2013)

3/28/2014

The registry stores information necessary to configure the system for applications and hardware devices. The registry also contains information that the operating system continually references during operation.

The Graphics, Windowing, and Events Subsystem (GWES) module in Windows Embedded Compact supports the windows, dialog boxes, controls, menus, and resources that make up the Windows Embedded Compact user interface (UI).

General GWES Registry Settings

You can configure general GWES-related settings by using the following entries, located in the key HKEY_LOCAL_MACHINE\SYSTEM\GWE\.

Name

Type

Description

Default value

cxHScr

REG_DWORD

Specifies the width of the arrow bitmap on a horizontal scroll bar.

0x00000013 = 19

cxVScr

REG_DWORD

Specifies the width of the arrow bitmap on a vertical scroll bar.

0x00000013 = 19

cxWidg

REG_DWORD

Specifies the width of a non-client button.

0x00000010 = 16

cyCap

REG_DWORD

Specifies the height of the non-client title bar.

0x00000017 = 23

cyHScr

REG_DWORD

Specifies the height of the arrow bitmap on a horizontal scroll bar.

0x00000013 = 19

cyThDef

REG_DWORD

Specifies the default height of the scroll thumb.

0x00000014 = 20

cyThMin

REG_DWORD

Specifies the minimum height of the scroll thumb for multiple pages.

0x00000005 = 5

cyVScr

REG_DWORD

Specifies the height of the arrow bitmap on a vertical scroll bar.

0x00000013 = 19

dtLBSrch

REG_DWORD

Specifies the number of milliseconds before search mode of a list box terminates.

0x000003E8 = 1000

NoSEH

REG_DWORD

Specifies whether C++ Structured Exception Handling (SEH) should be used for validation. Set to one of the following:

  • 0 (zero): Use SEH for validation.
  • 1: Do not use SEH for validation.

0x00000001 = 1

PORepaint

REG_DWORD

Provides functionality when power is applied to the device. To specify which functionality to provide, set to one of the following:

  • 0 (zero): The display driver handles all suspend and resume operations.
  • 1: GWE saves and restores the entire screen.
  • 2: GWE invalidates and repaints the entire screen.
  • 3: GWE and the driver save video memory.

In general, use the values 0 (zero) or 3 for display drivers that can allocate video memory for surfaces other than the desktop. Setting the value to 2 uses the least amount of system memory, but forces all applications to redraw all visible windows. Setting the value to 1 uses extra memory (equal to screen width × screen height × bytes per pixel) and does not force all applications to redraw visible windows.

0x00000001 = 2

SysColor

REG_BINARY

Specifies the system colors.

hex:E0, E0, E0, 00,

3A, 6E, A5, 00,

00, 00, 80, 00,

80, 80, 80, 00,

C0, C0, C0, 00,

FF, FF, FF, 00,

00, 00, 00, 00,

00, 00, 00, 00,

00, 00, 00, 00,

FF, FF, FF, 00,

C0, C0, C0, 00,

C0, C0, C0, 00,

80, 80, 80, 00,

00, 00, 80, 00,

FF, FF, FF, 00,

C0, C0, C0, 00,

80, 80, 80, 00,

80, 80, 80, 00,

00, 00, 00, 00,

00, 00, 00, 00,

FF, FF, FF, 00,

00, 00, 00, 00,

DF, DF, DF, 00,

00, 00, 00, 00,

FF, FF, E1, 00,

C0, C0, C0, 00,

00, 00, 00, 00,

10, 84, D0, 00,

B5, B5, B5, 00

Where each group of four corresponds to the following:

RGB valuesCorresponding constant
RGB(224, 224, 224)COLOR_SCROLLBAR
RGB(58, 110, 165)COLOR_BACKGROUND
RGB(000, 000, 128)COLOR_ACTIVECAPTION
RGB(128, 128, 128)COLOR_INACTIVECAPTION
RGB(192, 192, 192)COLOR_MENU
RGB(255, 255, 255)COLOR_WINDOW
RGB(000, 000, 000)COLOR_WINDOWFRAME
RGB(000, 000, 000)COLOR_MENUTEXT
RGB(000, 000, 000)COLOR_WINDOWTEXT
RGB(255, 255, 255)COLOR_CAPTIONTEXT
RGB(192, 192, 192)COLOR_ACTIVEBORDER
RGB(192, 192, 192)COLOR_INACTIVEBORDER
RGB(128, 128, 128)COLOR_APPWORKSPACE
RGB(000, 000, 128)COLOR_HIGHLIGHT
RGB(255, 255, 255)COLOR_HIGHLIGHTTEXT
RGB(192, 192, 192)COLOR_BTNFACE
RGB(128, 128, 128)COLOR_BTNSHADOW
RGB(128, 128, 128)COLOR_GRAYTEXT
RGB(000, 000, 000)COLOR_BTNTEXT
RGB(000, 000, 000)COLOR_INACTIVECAPTIONTEXT
RGB(255, 255, 255)COLOR_BTNHIGHLIGHT
RGB(000, 000, 000)COLOR_3DDKSHADOW
RGB(223, 223, 223)COLOR_3DLIGHT
RGB(000, 000, 000)COLOR_INFOTEXT
RGB(255, 255, 225)COLOR_INFOBK
RGB(192, 192, 192)COLOR_STATIC
RGB(000, 000, 000)COLOR_STATICTEXT
RGB( 16, 132, 208)COLOR_GRADIENTACTIVECAPTION
RGB(181, 181, 181)COLOR_GRADIENTINACTIVECAPTION

WidgSz

REG_DWORD

Specifies the size of widget images for non-client buttons and menu check marks. Set to one of the following:

  • 0 (zero): Normal size images.
  • 1: Large images.

0x00000000 = 0

Window Animation Settings

You can enable window animations by using the following entry, located in the key HKEY_LOCAL_MACHINE\SYSTEM\GWE\.

Name

Type

Description

Default value

Animate

REG_DWORD

Specifies whether to enable window animations. Set to one of the following:

  • 0 (zero): Disable window animations.
  • 1: Enable window animations.

When this registry value is not set, GWES enables window animations by default.

Not set.

To control the characteristics of window animations, use the following entries, located in the key HKEY_LOCAL_MACHINE\SYSTEM\GWE\Animate\.

Name

Type

Description

Default value

Frames

REG_DWORD

Specifies the number of frames in the animation.

When this registry value is not set, GWES uses 5 frames in the animation by default.

Not set.

DelayMilliseconds

REG_DWORD

Specifies the number of milliseconds between successive frames in the animation.

When this registry value is not set, GWES uses a delay of 10 milliseconds by default.

Not set.

You can allow OEMs to provide overlapping menus, which is useful for small screen devices. Use the following entry, located in the key HKEY_LOCAL_MACHINE\SYSTEM\GWE\Menu\.

Name

Type

Description

Default value

Overlap

REG_DWORD

Specifies the shift (in pixels) to display the cascading menu to create overlapping menus.

0x0000003C = 60

Message Box Settings

You can configure which buttons to show in message boxes by using the following entries, located in the key HKEY_LOCAL_MACHINE\SYSTEM\GWE\MsgBox\.

Name

Type

Description

Default value

NoCancelText

REG_SZ

Specifies a string to append to the message text, and hides the Cancel button in the message box.

Not set.

NoIgnoreText

REG_SZ

Specifies a string to display on a different line than the message text, and hides the Ignore button in the message box.

Not set.

DlgCtr

REG_BINARY

Specifies the rectangle in which to center message boxes.

Not set.

Notification Settings

You can configure notification settings by using the following entries, located in the key HKEY_LOCAL_MACHINE\SYSTEM\GWE\Notify\.

Name

Type

Description

Default value

MountTimeout

REG_DWORD

Specifies the total delay, in milliseconds, during which the OS waits for external file systems to initialize. MountTimeout determines how many times the OS attempts to mount the database volume. The thread that is trying to mount the volume waits for 5000 milliseconds between each attempt, so the OS makes a maximum of MountTimeout/5000 attempts to mount a database volume.

0x00004E20 = 20000

ShowErrorUI

REG_DWORD

Specifies whether an error message box is displayed by the notification subsystem when errors occur. Set to one of the following:

  • 0 (zero): Disable the error message box.
  • A nonzero value: Enable the error message box.

Not set.

Volume

REG_SZ

Specifies the name of the file that stores the notification databases. If the Volume key does not exist, the OS creates a database named DB_notify_queue in the object store by default.

Not set.

Printer Driver Settings

The printing registry stores information necessary to configure the behavior of the printer and printer driver.

For information about the printing registry, see Printer Driver Registry Settings.

Out-of-Memory Settings

You can configure out-of-memory settings by using the following entries, located in the key HKEY_LOCAL_MACHINE\SYSTEM\OOM\.

Name

Type

Description

Default value

cbLow

REG_DWORD

Specifies the threshold, in bytes, at which the amount of memory available is considered to be low.

The number of bytes of memory available at the threshold is the maximum of cbLow or (cpLow × PageSize).

0x00004524 = 17700

cpLow

REG_DWORD

Specifies the threshold, in pages, at which the amount of memory available is considered to be low.

The number of bytes of memory available at the threshold is the maximum of cbLow or (cpLow × PageSize).

0x000000B1 = 177

cbCritical

REG_DWORD

Specifies the threshold, in bytes, at which the amount of memory available is considered to be critical.

The number of pages of memory available at the threshold is the maximum of cpCritical or (cbCritical × PageSize).

Not set.

cpCritical

REG_DWORD

Specifies the threshold, in pages, at which the amount of memory available is considered to be critical.

The number of pages of memory available at the threshold is the higher of the two values: cpCritical or cbCritical / PageSize).

Not set.

cbLowBlkSz

REG_DWORD

Specifies the size, in bytes, of the largest block of memory that can be virtually allocated with the VirtualAllocfunction when doing so leaves the system with fewer bytes than the value of cbLow.

The number of pages that can be allocated is the higher of the two values: cpLowBlkSz or cbLowBlkSz / PageSize.

Not set.

cpLowBlkSz

REG_DWORD

Specifies the size, in pages, of the largest block of memory that can be virtually allocated with the VirtualAllocfunction when doing so leaves the system with fewer pages than the value of cpLow.

The number of pages that can be allocated is the higher of the two values: cpLowBlkSz or cbLowBlkSz / PageSize.

Not set.

cbCritBlkSz

REG_DWORD

Specifies the size, in bytes, of the largest block of memory that can be virtually allocated with the VirtualAllocfunction when doing so leaves the system with fewer bytes than the value of cbCritical.

The number of pages that can be allocated is the higher of the two values: cpCritBlkSz or cbCritBlkSz / PageSize.

Not set.

cpCritBlkSz

REG_DWORD

Specifies the size, in pages, of the largest block of memory that can be virtually allocated with the VirtualAlloc function when doing so leaves the system with fewer pages than the value of cpCritical.

The number of pages that can be allocated is the higher of the two values: cpCritBlkSz or cbCritBlkSz / PageSize.

Not set.

cmsWait

REG_DWORD

Specifies the number of milliseconds to wait for the application to shut down. For example, when the Out of Memory (OOM) handler attempts to close an application, it must wait for the time period in cmsWait and reverify the memory conditions before it closes the application.

If this registry value is not set, GWES uses a wait time of 8000 milliseconds by default.

Not set.

AutoOOM

REG_DWORD

When the device memory falls below the out-of-memory (OOM) threshold, indicates whether to automatically close windowed applications in the background, without prompting or alerting the user.

Set to one of the following:

0 (zero): Don't automatically close windowed applications in the background without notifying the user.

1: Automatically close windowed applications in the background without notifying the user.

See "AutoOOM Settings" below for details on how to specify which applications to exclude from being automatically closed during an out-of-memory condition.

Not set.

AutoOOM Settings

You can configure the set of applications that AutoOOM will not automatically close during an out-of-memory (OOM) condition by adding an entry for each application in the registry key HKEY_LOCAL_MACHINE\SYSTEM\OOM\AUTOOOM\DONOTKILLAPPS. Each entry should be in the form of "appname.exe"=dword:1.

You can add a maximum of 32 applications to this registry key. To remove an application from the list, you must remove the registry entry for that application. Windows Embedded Compact reads these applications from the registry at startup, so a reboot is required for any changes to take effect.

The applications you specify in this registry key are appended to a default set of applications defined in the AutoOOM code. You can modify this list in the code in order to specify applications that must never be automatically closed by the AutoOOM feature when system memory falls below the OOM threshold.

Note

If the system hits an out-of-memory condition and all opened applications are registered under the DONOTKILLAPPS registry key, then storage memory is converted to program memory to let applications run.

Name

Type

Description

Default Value

"<appname>.exe"

REG_DWORD

Name of an application to exclude from being automatically closed by the AutoOOM feature when system memory falls below the OOM threshold. The application name is used by OOM handler when the AutoOOM feature is on.

Not set.

Screen Rotation Settings

By default, the screen is rotated zero degrees after downloading the run-time image to the device. You can change the default angle of the screen by using the following entry, located in the key HKEY_LOCAL_MACHINE\SYSTEM\Rotation\. However, any applications that subsequently run on the device and rotate the screen will override the settings in the registry file.

For more information about display settings, see Display Driver Registry Settings.

Name

Type

Description

Default value

Angle

REG_DWORD

Specifies the angle to rotate the default screen orientation. Set to any positive value, for example:

  • 0 (zero): No rotation.
  • 5A: Rotate 90 degrees clockwise.
  • B4: Rotate 180 degrees clockwise.
  • 10E: Rotate 270 degrees clockwise.

0 (zero)

Examples

Description

The following examples show how to set common registry values for the GWES module.

Code

  • General GWES settings
    These settings configure general GWES-related settings.

    [HKEY_LOCAL_MACHINE\SYSTEM\GWE]
        "cyCap"=dword:2A
        "WidgSz"=dword:1
        "cyThMin"=dword:15
        "cyThDef"=dword:32
        "cxWidg"=dword:32
        "cxHScr"=dword:38
        "cyHScr"=dword:38
        "cxVScr"=dword:38
        "cyVScr"=dword:38
        "SysColor"=hex:E0,E0,E0,00, 00,80,80,00, 80,80,FF,00, 80,80,80,00,
                       C0,C0,C0,00, FF,FF,FF,00, 00,00,00,00, 00,00,00,00,
                       00,00,00,00, FF,FF,00,00, C0,C0,C0,00, C0,C0,C0,00,
                       80,80,80,00, 00,00,FF,00, FF,FF,00,00, C0,C0,C0,00,
                       80,80,80,00, 80,80,80,00, 00,00,00,00, C0,C0,C0,00,
                       FF,FF,FF,00, 00,00,00,00, DF,DF,DF,00, 00,00,00,00,
                       FF,FF,E1,00
    
  • Message boxes
    These settings configure message boxes to hide the Cancel and Ignore button, and display the message boxes in a specific rectangle on the screen.

    [HKEY_LOCAL_MACHINE\SYSTEM\GWE\MsgBox]
        "NoCancelText"="This text is appended to the message text."
        "NoIgnoreText"="\nThis text shows on a different line than the message text."
        "DlgCtr"=hex:00,00,00,00,00,00,00,00,f0,00,00,00,78,00,00,00
    
  • Notifications
    These settings configure notifications.

    [HKEY_LOCAL_MACHINE\SYSTEM\GWE\Notify]
        "Volume"="\\hard disk\\notify.db"
        "ShortApiTimeout"=DWORD:3000
        "LongApiTimeout"=DWORD:15000
        "MountTimeout"=DWORD:20000
        "ShowErrorUI"=DWORD:1
    

See Also

Other Resources

Graphics, Windowing, and Events (GWES)
Printer Driver Registry Settings
Display Driver Registry Settings