wxWidgets/include/wx/msw
Vadim Zeitlin 7ee21e3a3d Fix fatal bug in wxGetWindowFromHWND() for radio buttons.
wxGetWindowFromHWND() could crash if it was called for a HWND of a radio
button which was not created by wxWidgets because it blindly dereferenced the
user data associated with the button expecting it to be a pointer to
wxRadioBox and crashed if it was something different. And this actually
happened when using the standard Windows printing dialog which can contain
radio buttons which obviously used their user data field for their own
purposes.

Fix this by maintaining a global hash map with radio buttons HWNDs as keys and
radio boxes as values. This ensures that we can always safely check whether
the given HWND is a radio button in one of our radio boxes or not.

Also change wxSpinCtrl which already did something similar in a different way
(using an array instead or a more efficient hash map) for consistency.

Closes #12083.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-30 23:50:39 +00:00
..
ole Don't handle RPC_E_CHANGED_MODE return of OleInitialize() as an error. 2010-10-24 23:03:31 +00:00
private Better checks for wxMSWKeyboard::VKToWX() return value. 2010-09-22 13:31:41 +00:00
wince Merge wxUIActionSimulator fixes from SOC2010_GUI_TEST branch. 2010-08-22 22:15:42 +00:00
accel.h
amd64.manifest
app.h Implement wx-prefixed macros versions of DECLARE/IMPLEMENT_APP_* macros. 2010-06-09 13:23:13 +00:00
apptbase.h
apptrait.h
bitmap.h
blank.cur
bmpbuttn.h
bmpcbox.h Make SetFont() public (fixes #9641) 2010-07-25 07:39:17 +00:00
brush.h
bullseye.cur
button.h Add new wxCommandLinkButton class. 2010-08-17 14:48:50 +00:00
calctrl.h
caret.h
cdrom.ico
checkbox.h
checklst.h
child.ico
chkconf.h
choice.h
clipbrd.h
colordlg.h
colour.h
colours.bmp
combo.h
combobox.h
commandlinkbutton.h Add new wxCommandLinkButton class. 2010-08-17 14:48:50 +00:00
computer.ico
control.h
crashrpt.h
cross.cur
csquery.bmp
ctrlsub.h
cursor.h
datectrl.h
dc.h
dcclient.h
dcmemory.h
dcprint.h
dcscreen.h
dde.h
debughlp.h
dialog.h
dib.h No real changes, just inline wxDIB::Create(). 2010-10-24 22:40:34 +00:00
dirdlg.h
dragimag.h
drive.ico
enhmeta.h
evtloop.h
fdrepdlg.h
file1.ico
filedlg.h
floppy.ico
folder1.ico
folder2.ico
font.h Return wxFONTFAMILY_DEFAULT, not UNKNOWN, from wxFont::GetFamily(). 2010-09-29 13:46:09 +00:00
fontdlg.h
frame.h
fswatcher.h
gauge.h Use PBM_SETMARQUEE to implement indeterminate mode in wxMSW wxGauge. 2010-06-20 17:43:02 +00:00
gccpriv.h
gdiimage.h Fix file paths in the header comments. 2010-07-13 13:29:58 +00:00
genrcdefs.h
glcanvas.h
hand.cur
headerctrl.h
helpbest.h
helpchm.h
helpwin.h
htmlhelp.h Globally use "wxWindows licence" consistently. 2010-07-13 13:29:13 +00:00
hyperlink.h Provide native wxHyperlinkCtrl implementation for wxMSW. 2010-08-17 16:55:32 +00:00
ia64.manifest
icon.h
imaglist.h
iniconf.h Fix file paths in the header comments. 2010-07-13 13:29:58 +00:00
joystick.h
libraries.h
listbox.h Add missing Init() call to one of wxListBox ctors in wxMSW. 2010-06-10 10:40:21 +00:00
listctrl.h Implement wx-prefixed macros versions of DECLARE/IMPLEMENT*CLASS macros. 2010-06-09 13:55:48 +00:00
magnif1.cur
mdi.h
mdi.ico
menu.h
menuitem.h
metafile.h
microwin.h
mimetype.h
minifram.h
missing.h Compilation fixes for old SDKs (VC6) after recent commit. 2010-09-21 12:57:59 +00:00
msgdlg.h Check for task dialog availability even under Vista and later. 2010-10-15 23:46:19 +00:00
mslu.h
msvcrt.h
notebook.h Refactor: use wxBookCtrlBase::m_selection in all derived classes. 2010-10-27 16:54:36 +00:00
notifmsg.h
ownerdrw.h
palette.h
pbrush.cur
pen.h
pencil.cur
pntleft.cur
pntright.cur
popupwin.h
printdlg.h
printwin.h
private.h
progdlg.h Always use native task dialog for wxProgressDialog under MSW if supported. 2010-09-20 13:11:03 +00:00
question.ico
radiobox.h Fix fatal bug in wxGetWindowFromHWND() for radio buttons. 2010-10-30 23:50:39 +00:00
radiobut.h
rcdefs.h
regconf.h
region.h
registry.h
removble.ico
richmsgdlg.h Add wxRichMessageDialog class. 2010-08-18 22:48:41 +00:00
rightarr.cur
roller.cur
scrolbar.h
seh.h
setup0.h Merge wxUIActionSimulator fixes from SOC2010_GUI_TEST branch. 2010-08-22 22:15:42 +00:00
setup_inc.h
slider.h Improve positioning of wxSlider min/max labels in wxMSW. 2010-10-28 13:52:50 +00:00
sound.h
spinbutt.h
spinctrl.h Fix fatal bug in wxGetWindowFromHWND() for radio buttons. 2010-10-30 23:50:39 +00:00
stackwalk.h
statbmp.h
statbox.h
statline.h
stattext.h
statusbar.h
std.ico
stdpaths.h
subwin.h
taskbar.h
textctrl.h No changes, just refactor wxTextCtrl::SetStyle() in wxMSW. 2010-09-18 16:26:30 +00:00
textentry.h
tglbtn.h Globally use "wxWindows licence" consistently. 2010-07-13 13:29:13 +00:00
tls.h
toolbar.h
tooltip.h
toplevel.h Fix wxMSW rendering artifacts with modal dialogs. 2010-09-16 09:05:48 +00:00
treectrl.h Implement wx-prefixed macros versions of DECLARE/IMPLEMENT*CLASS macros. 2010-06-09 13:55:48 +00:00
uxtheme.h Fix confusion with LOGFONT{A,W} parameters to MSW GetTheme[Sys]Font(). 2010-10-30 23:50:22 +00:00
uxthemep.h Globally use "wxWindows licence" consistently. 2010-07-13 13:29:13 +00:00
window.h Rename wxCharCode{MSWToWX,WXToMSW}() and move them to a separate header. 2010-09-11 10:18:53 +00:00
winundef.h
wrapcctl.h
wrapcdlg.h
wrapgdip.h
wrapshl.h
wrapwin.h
wx.manifest
wx.rc