Fix infinite loop in wxMSW with wxStaticBox inside non-wxTAB_TRAVERSAL parent.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 30 Aug 2013 23:32:42 +0000 (23:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 30 Aug 2013 23:32:42 +0000 (23:32 +0000)
commit3c3e94dc01ce543f3d010778b443c14974121caa
tree9bf62f5c0e7337dcdd7abd772399c31743bce420
parent69384772acc96ab55b235f8d0e4d67d8ee4d6862
Fix infinite loop in wxMSW with wxStaticBox inside non-wxTAB_TRAVERSAL parent.

We didn't ensure that the parent of a (native) control with WS_EX_CONTROLPARENT
had this style as well, unlike for our own windows. Fix this now to make
certain that we never call ::IsDialogMessage() on a window whose parent
doesn't have WS_EX_CONTROLPARENT as it simply hangs in this case, entering an
infinite loop searching for the default button.

Also try to reduce the possibility of such bugs in the future by checking for
WS_EX_CONTROLPARENT and not wxTAB_TRAVERSAL before calling ::IsDialogMessage()
even if this doesn't totally prevent them (it wasn't sufficient to fix even
this particular bug).

Closes #15458.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/msw/window.cpp