PRB: Infinite Loop When Buttons are Selected With Arrow Key

Last reviewed: January 15, 1998
Article ID: Q179366
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK)

SYMPTOMS

When a dialog box appears in response to a user pressing an arrow key to select an option button on a dialog box, the user cannot immediately close the dialog box by selecting the OK button.

CAUSE

IsDialogMessage causes multiple BN_CLICKED messages to be sent when the focus is on an option button. This is due to the simulation of what happens when the option button has the BS_AUTORADIOBUTTON style.

RESOLUTION

Use the dialog editor to remove the BS_AUTORADIOBUTTON style from the option button, and then call the CheckRadioButton member function in each of the radio button handlers.

STATUS

This behavior is by design.

MORE INFORMATION

NOTE: Removing the BS_AUTORADIOBUTTON style will not allow DDX to work with the option buttons.

(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Isaac Varon, Microsoft Corporation

Keywords          : UsrCtl UsrDlgs UsrInp
Platform          : 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: January 15, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.