Positioning Message Boxes

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

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

By default, Windows Embedded CE centers all message boxes on the available desktop. You can override this default behavior by specifying a rectangle that indicates the area of the screen, in screen coordinates, where Windows Embedded CE is to center the message box. The rectangle appears in the registry under the key HKEY_LOCAL_MACHINE\System\GWE\DlgCtr.

The rectangle, defined in the RECT structure, appears in the registry file as shown in the following example.

[HKEY_LOCAL_MACHINE\SYSTEM\GWE]
    "DlgCtr"=hex:00,00,00,00,00,00,00,00,f0,00,00,00,78,00,00,00

Windows Embedded CE reads this value from the registry once during initialization and uses the same value until the target device is reset. If the registry value is deleted, the default behavior is restored.

See Also

Concepts

Customizing Dialog Boxes and Message Boxes