PRB: Selecting Overlapping Controls in Dialog Editor

Last reviewed: November 2, 1995
Article ID: Q90384
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) versions 3.1, 3.5, 3.51, and 4.0

SYMPTOMS

Create a dialog box using the Dialog Editor. Place a button onto the dialog box. Create a frame and place it so that it encompasses the button. It is not possible to select that button with the mouse. However, if the frame is created before the button and then moved or placed over the button, then it is possible to select either the frame or the button.

CAUSE

This behavior is by design. When controls are overlapped, the control that is selected when the mouse is clicked is the one that comes last in Z-order.

As a special case, it is possible to select a control placed "underneath" a group box.

RESOLUTION

From the Arrange menu, choose Order/Group. This will bring up a dialog box. Change the Z-order of the button to be after that of the frame. The Z-order may also be changed by manually editing the resource file. The controls that are further down in the file will be "on top."

NOTE: If the frame is selected and is on top of the button, pressing SHIFT+TAB selects the previous control, which will be the button. This does not allow the position of the control to be changed with the mouse; however, it does allow the text and size to be changed.


Additional reference words: 3.10 3.50 4.00 95
KBCategory: kbtool kbprb
KBSubcategory: TlsDlg


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: November 2, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.