Cast socket handle to a 32 bit value as we use it with "%d" (or "%u" now as it
makes more sense) format specifier to avoid problems with type mismatches
under Win64.
Closes#14204.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This class allows using virtual wxFSFiles with any wx functions taking
streams. E.g. it makes it possible to load images and animations from
wxFileSystem.
Closes#14185.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This stream allows to wrap another stream. This is a useful base class for
adapter classes providing stream interface on top of something else, like the
upcoming wxFSInputStream.
See #14185.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function can be used to obtain language/locale-independent representation
of an accelerator. This is particularly useful for storing it in configuration
files.
Closes#14228.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use IFileDialog in wxDirDialog implementation if possible, it shows a much
more user-friendly dialog than the one used by SHBrowseForFolder().
Closes#11401.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Exit() is documented to call OnExit() and the pthreads version of wxThread did
behave as documented, so make wxMSW follow it as well and explicitly call
OnExit() before exiting the thread.
Closes#14212.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The #endif was somehow added at a wrong place and too much
wxDateTime-unrelated code was disabled when wxUSE_DATETIME was off.
Closes#14222.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When building wxGTK under MSW, always use UTF-8 as file name encoding because
GTK+ doesn't use G_FILENAME_ENCODING there.
Add a helper wxGTK_CONV_FN() macro to hide the difference between the
platforms.
Closes#14035.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These brackets are probably not really necessary but add them just in case
they can help with parsing some strange expressions and for consistency with
the other wxGTK_CONV_XXX() macros.
See #14035.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This file doesn't seem to be needed and the open() declaration in it actually
results in errors when using the latest gccxml from cvs under Windows, so just
get rid of it entirely.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make wxMSW consistent with the other ports and set the menu itself, not the
window it is attached to, as the event object for the menu open/close events.
See #1595.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Not only this avoids code duplication but it also fixes wrong code in
wxFrameBase version as it set the event object incorrectly to the frame itself
instead of setting it to the menu.
Added event object check to the menu events unit test.
Closes#1595.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Just verify that an event with the expected id was generated. The test will be
extended later to test for other event fields such as its source object,
see #1595.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't duplicate FindItemInMenuBar() code in ProcessCommand() and, more
importantly, use the overridden version of FindItemInMenuBar() in MDI parent
frame in wxMSW to allow using ids corresponding to the active child frame menu
items.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxDataViewIconTextRenderer changed the icon to that of the last item drawn by
it when editing a cell. Fix this by getting the original icon directly from
the model instead of from the last item.
Closes#14187.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was possible to hide the main part of a combobox control but keep its popup
shown and this notably happened in wxGrid when TAB was pressed while a
wxChoice cell editor was dropped down.
Avoid this Cheshire combobox syndrome by explicitly dismissing the popup when
a combobox is hidden.
Closes#3113.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This compiler doesn't exist any more and was probably unsupported even in 2.8,
let alone 2.9, so remove all the __MWERKS__ tests to simplify things.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The main window itself should be added using DoAddHWND() and not
AddOtherWindow() as it is not, precisely, "other". This fixes removing and
updating it twice unnecessarily.
Closes#14184.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Rename wxToolTip::DoAddOtherWindow() to DoAddHWND() as it should be used for
adding any window associated with the tooltip, either the main or an auxiliary
one. And rename wxToolTip::Add() to AddOtherWindow() because it shouldn't be
used for the main window.
See #14184.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It turns out that the changes r71028 were unnecessary (and actually harmful)
in most cases, they're only needed when a DIB is used as a source DC. So move
the manual coordinates adjustments to the branch of code using StretchDIBits()
and don't do it anywhere else.
Also don't list this as an incompatible change as wxMSW actually already
worked as the other ports in the majority of cases and list it as a simple bug
fix instead.
Closes#14188.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If a class is used somewhere as parameter or return value types then it needs to be documented, at least for Phoenix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If two radio buttons are created consecutively, they should be part of the
same radio group, even if wxRB_GROUP hadn't been explicitly used for the first
of them.
Do this is for consistency with wxMSW and also because the alternative
behaviour doesn't make much sense.
Also stop iterating too far backwards when searching for the group to be used
for a new radio button and add comments explaining what's going on here.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775