Microsoft KB Archive/182384

= PRB: Controls Do Not Appear Inside GroupBox on Windows CE =

Article ID: 182384

Article Last Modified on 7/27/2004

-

APPLIES TO


 * Microsoft Windows CE 2.0 for the Handheld PC
 * Microsoft Windows CE 1.0
 * Microsoft Windows CE 1.01
 * Microsoft Windows CE 2.01

-



This article was previously published under Q182384



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.

Keywords: kbstaticctrl kbprb kbctrl KB182384

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.