PRB: Controls Do Not Appear Inside GroupBox on Windows CE

Last reviewed: March 12, 1998
Article ID: Q182384
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK)
  • Microsoft Windows CE, versions 1.0, 1.01

SYMPTOMS

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

CAUSE

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

RESOLUTION

To avoid this, the GroupBox must be placed lower in the Z-order than the controls that it contains. You can change the Z-order of the GroupBox in Developer Studio's Resource Editor by editing the tab stop order so that the GroupBox comes last. Or, you can altered it directly in the RC file by placing the GroupBox 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 GroupBox, the accelerator will take the user to the first control after the GroupBox.

Keywords          : UsrCtl
Version           : WINDOWS:1.0,1.01; WINNT
Platform          : WINDOWS winnt
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 12, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.