Avoid spurious errors when getting wxChoice or wxListBox client data in wxMSW.

Even after the changes of r70415, we could still report an error when the
item client data was set to -1 (== CB_ERR) as checking for GetLastError() was
not enough, we need to also ensure that the last error is reset before trying
to get the client data.

Also apply the same fix to wxListBox and add the tests verifying that this
does work correctly.

Closes #13883.

Also fix wxListBox::GetClientData().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Work around a failure in TreeCtrlTestCase::SelectionChange() unit test.

We were getting an extra event under MSW if the control was initially
unfocused, so do focus it. This is a work around as the extra event shouldn't
occur but I'm too afraid of changing wxMSW code itself so close to 3.0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Update the year in the built-in wxWidgets version dialog.

Simply s/2011/2013/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix wxDataFormat comparison operators for wxDF_HTML under wxMSW.

This format is special as it doesn't have a fixed value and is registered
dynamically instead. So we need to call HtmlFormatFixup(), which checks if the
given custom format is actually wxDF_HTML, before comparing formats to ensure
that the real value assigned to this format compares correctly to the fixed
wxDF_HTML value.

Closes #15280.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't leave dangling comboboxes in the GUI unit test suite.

Sort() and ReadOnly() tests created a new combobox without deleting the old
one, and so these comboboxes were left on the screen for the duration of all
the subsequent tests, subtly breaking them. E.g. this was responsible for
spurious breakages in the event propagation test case because sometimes the
context menu event showed the combobox context menu (why this didn't happen
always is another question...).

It would be great to find some way to ensure that nothing is left after a test
terminates but I'm not sure about how to do this with cppunit. So for now just
manually delete the extraneous comboboxes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do define __VISUALC__ when using Intel compiler under Windows.

This undoes r74888, r74913 and r74969 because all of them were still not
enough to make ICC build work correctly. So instead of trying to find all the
places where we need to test for __INTELC__ in addition to __VISUALC__, just
revert to defining __VISUALC__ for ICC under Windows as it uses its CRT anyhow
and in the vast majority of cases we are actually testing for the CRT and not
the compiler anyhow.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document that autocompletion is not implemented for wxOSX wxComboBox.

While the relevant methods are in wxTextEntry, they are only really
implemented for wxTextCtrl in wxOSX, not wxComboBox, which also derives from
wxTextEntry.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use owner drawn items under Win7 even when using larger bitmaps.

The check for menu bitmaps size added in r58557 was apparently only needed for
XP and earlier versions and doesn't seem to be necessary under Win7, so don't
use it there, if only because it allows to retrieve the menu item text which
is useful for automation/screen reader tools.

Closes #13544.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only auto-link wsock32.dll if net library is used.

Otherwise linking with it can create problems with the code using other
network libraries, which link with ws2_32.dll (Winsock 2).

See #15562.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added a changelog section for 3.0-RC2.

List the most important changes since 3.0-RC1 already done.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxOleConvertVariant_ReturnSafeArrays flag for better SAFEARRAY handling.

While we can't change the type of wxVariant to which SAFEARRAYs are converted
by default, it's much more convenient to work with the variant objects of the
correct type, i.e. using wxVariantDataSafeArray, when dealing with SAFEARRAYs,
so add a flag which can be set to tell a wxAutomationObject to behave in this
way.

Closes #14700.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix pointer truncation in wxListEvent::GetData() in LLP64 builds.

We must use wxUIntPtr and not long here to avoid truncating the upper half of
the pointer when sizeof(void*)>sizeof(long).

Closes #15578.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't undefine __WXMSW__ for console mode applications using wxWidgets.

This partially undoes the changes of r73290 by keeping __WXMSW__ defined for
the console mode user applications and only undefining it when building
wxWidgets itself.

This allows the existing code using __WXMSW__ to continue compiling correctly
with wxWidgets 3.0.

Closes #15579.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document that wxEVT_MENU_CLOSE can come before wxEVT_MENU.

This is somewhat unexpected but is how both wxMSW and wxGTK work currently, so
just document the current behaviour.

See #15479.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775