PRB: Controls Do Not Appear Inside GroupBox on Windows CE

ID: Q182384

The information in this article applies to:

SYMPTOMS

Controls in a dialog box that should be displayed inside a group box show up in the emulator, but do not appear on the device.

CAUSE

Group boxes on Windows CE are opaque rectangles, instead of transparent rectangles as on Windows 95 or Windows NT. As a result, group boxes cover and hide any controls that are beneath them in the Z-Order.

RESOLUTION

To avoid this, the group box must be placed lower in the Z-order than the controls that it contains. You can change the Z-order of the group box in Developer Studio's Resource Editor by editing the tab stop order so that the group box comes last. Or, you can altered it directly in the RC file by placing the group box last in the list of resources for the dialog box:

   BEGIN
       DEFPUSHBUTTON   "OK",IDOK,129,7,50,14
       PUSHBUTTON      "Cancel",IDCANCEL,129,24,50,14
       PUSHBUTTON      "Button1",IDC_BUTTON1,23,19,50,14
       PUSHBUTTON      "Button2",IDC_BUTTON2,39,37,50,14
       PUSHBUTTON      "Button3",IDC_BUTTON3,62,57,50,14
       GROUPBOX        "Static",IDC_STATIC,14,7,103,70
   END

STATUS

This behavior is by design.

MORE INFORMATION

If an accelerator key is assigned to the group box, the accelerator will take the user to the first control after the group box.

Applications running on the Palm-size PC should not use group boxes. Separator bars should be used in place of group boxes. See the Palm-size PC User Interface Design Guidelines in the Windows CE Programmers Guide.

Additional query words:

Keywords          : kbCtrl kbStaticCtrl kbGrpUser kbWinCE100 kbWinCE200 kbWinCE101 kbWinCE201 
Issue type        : kbprb

Last Reviewed: January 2, 1999