- /*
- wxRB_SINGLE is a temporary workaround for the following problem: if you
- have 2 radiobuttons in the same group but which are not consecutive in
- the dialog, Windows can enter an infinite loop! The simplest way to
- reproduce it is to create radio button, then a panel and then another
- radio button: then checking the last button hangs the app.
-
- Ideally, we'd detect (and avoid) such situation automatically but for
- now, as I don't know how to do it, just allow the user to create
- BS_RADIOBUTTON buttons for such situations.
- */
- msStyle |= HasFlag(wxRB_SINGLE) ? BS_RADIOBUTTON : BS_AUTORADIOBUTTON;
+ // we use BS_RADIOBUTTON and not BS_AUTORADIOBUTTON because the use of the
+ // latter can easily result in the application entering an infinite loop
+ // inside IsDialogMessage()
+ //
+ // we used to use BS_RADIOBUTTON only for wxRB_SINGLE buttons but there
+ // doesn't seem to be any harm to always use it and it prevents some hangs,
+ // see #9786
+ msStyle |= BS_RADIOBUTTON;