The minimal size wasn't respected when auto-sizing rows/columns in
Set{Row,Col}Size() which was called in response to double clicking the
separator line, which resulted in clearly wrong behaviour as the user was
prevented from resizing the row/column to a smaller size by dragging them but
not by double clicking, so fix this to respect the minimal size as well.
Closes#15627.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While compiler TLS support is simpler to use and much faster than using our
own Win32 API-based TLS implementation, it results in difficult to debug
crashes when used inside a dynamically loaded DLL under Windows XP, so disable
it by default to be safe.
Closes#13116.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Exchange the order of setting/resetting the new/old button as the default one
when focus is lost/gained to avoid the possibility of having two simultaneously
default buttons at once.
Closes#9528.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make DrawIcon() work when printing: it previously didn't, as we used
::DrawIconEx() Windows function which wasn't supported when printing.
Work around this by using DrawBitmap() if necessary.
Closes#379.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We read beyond the provided maximal length as we didn't update the remaining
length while parsing the remaining bytes of an UTF-8-encoded code point.
Fix this and add a test for it.
Closes#15901.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The screen to client conversion for this event coordinates took the toolbar
height into account twice, resulting in a wrong value if the event was handled
in a frame that did have a toolbar.
Closes#15812.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Drawing on a wxBitmap via wxMemoryDC modified its pixmap representation in
wxGTK and even if its pixbuf representation was later changed using direct
access to the bitmap pixels, the out of date pixmap continued to be used,
creating the illusion of direct access being completely ignored.
Fix this by purging the old pixmap representation when locking the bitmap for
raw access.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code could crash if m_overflowVisible was true but m_overflowSizerItem was
NULL. Ideally this shouldn't happen in the first place, but it did, so at
least fix the crash for now -- and hopefully this code will be refactored to
make it more clear later.
Backport from trunk, see #15747.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Generalize the code in wxTopLevelWindowBase dtor checking for the children of
the TLW being destroyed pending for deletion themselves to work when the child
TLW is an indirect child, i.e. was created with a child window of this TLW as
parent and not this TLW itself.
Closes#15743.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Under this system vsscanf() is declared as taking a non-const char* as first
argument which prevented our code using it from compiling. Wrap it in
wxCRT_VsscanfA() adding the necessary const_cast<> to fix this.
Closes#15638.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Subsequent calls didn't initialize the hidden window correctly because
wxSocket::Shutdown() unregistered the window class used for it, but
wxSocket::Initialize() still kept a pointer to the previously registered class
name.
Don't remember it any longer, unlike in the other cases where we use
wxCreateHiddenWindow(), this function is only ever going to be called once
until the class is unregistered anyhow, so it doesn't have to be static.
Closes#15701.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxUIntPtr, not long, and SetItemPtrData() instead of SetItemData(), to
ensure that we preserve the values of client data pointers in 64 bit build,
otherwise they were truncated to 32 bits.
Closes#15687.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We multiplied the number of items by the size of each element twice, once in
wxVector::reserve() itself and once in Ops::Realloc() it called, so we
allocated much more memory than actually needed.
Fix this by passing the number of elements to Ops::Realloc().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is important not only for consistency with the other platforms but also
because without SIZEOF_LONG_LONG being defined, "%lu" format specifier can't
be used with size_t values under Win64, as Arg_Size_t is not defined correctly
there if SIZEOF_LONG_LONG is unknown.
Closes#15670.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We didn't repaint the owner drawn combobox items any more because they were
not found by MSWFindItem().
Fix this by restricting the check to the real windows with the same ID as the
combobox, not the dropdown items which are not windows at all.
Closes#15674.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The recent changes to mouse wheel scrolling broke it for the generic
wxListCtrl and probably any other situation in which scrollbars don't scroll
the window itself but some subwindow of it. In this case, the scroll wheel
event handler doesn't have any scrollbar to adjust, so it simply does nothing
and shouldn't return true, as it did since r74911.
Just return false in case we are not doing anything to let the mouse wheel
work as before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We detected that the label was invalid and gave a debug warning message about
it but then still proceeded to crash by accessing the data beyond the end of
the string. Don't do this.
Closes#15665.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If a wxComboBox was created with ID=1000, clicking in its drop down didn't
work.
It turns out that the native combobox control always creates its dropdown
listbox with the ID of 1000 and that when we were getting LBN_SELCHANGE from
it we mishandled this message because our code mistakenly believed that all
messages from the ID of the control itself were, in fact, coming from this
control, which wasn't the case here.
Fix this by adding a special check for this case in wxComboBox. Also
virtualize the dynamic cast which was done in wxWindow::FindItem() as this
makes the code simpler and allows to get rid of __WXUNIVERSAL__ #ifdef as
well.
Closes#15647.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid conflict between wxMSW symbol defined in wx/platinfo.h in this build
configuration and wxMSW namespace by renaming the latter to wxMSWImpl, which
is also consistent with the namespace name used elsewhere.
Closes#15624.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775