WM_CLOSE was not processed at all for native windows wrapped by
wxNativeContainerWindow because we don't handle it ourselves at wxWindow level
but still mark it as processed in order to prevent DefWindowProc() from
destroying the window. Unfortunately this also prevented the original handler
for this message in the native window from being called.
Calling just the original handler and not the wxWidgets one is not ideal
neither but is much better as it allows to e.g. close MFC frames wrapped in
wxNativeContainerWindow whereas before this didn't work at all as WM_CLOSE was
completely ignored.
Also call the original handler for WM_DESTROY to avoid similar potential
problems with this message, even if it doesn't seem to create any with MFC.
Extend the mfc sample to show how a wxPanel can be embedded into the existing
CFrameWnd.
They are relatively important, especially the origin-related ones as
SetUserScale() can (should?) be used instead of SetLogicalScale(), but
SetLogicalOrigin() can be more convenient than SetDeviceOrigin(), so provide
at least skeletal documentation for them.
Comparing wchar_t with int doesn't compile under OpenVMS because of
%CXX-E-AMBIGUOUSOPRFUN, more than one operator ">=" matches these operands:
built-in operator "arithmetic >= arithmetic"
function "operator>=(wchar_t, const wxUniChar &)"
operand types are: wchar_t >= enum <unnamed>
Try to work around this by explicitly casting wchar_t to int.
Don't use wxGROW and wxALIGN_CENTRE together in a wxBoxSizer, this doesn't
make sense as the latter is just ignored.
Also use wxEXPAND instead of wxGROW for consistency with the flags elsewhere
in the same file.
Closes#17063.
Horizontal alignment of bitmap associated with wxPGChoice item drawn in wxPGComboBox (in wxPropertyGrid::OnComboItemPaint) needs to be adjusted by 1 pixel (as it is already done for text label) in order to get the bitmap in the same position when wxPGComboBox is selected.
The number of frames between the code containing the assert and the code
generating the stack trace is not the same under different platforms and so
hardcoding 8 for it in wxAppTraitsBase::GetAssertStackTrace() worked for wxMSW
but not e.g. wxGTK.
Instead, just ignore all frames up to and including the one for wxOnAssert()
itself. This makes the code work correctly on all platforms and it also won't
need to be modified whenever any extra functions are added/removed
(wxGTK-specific code in utilsgtk.cpp used wrong number of frames too, even
though it was presumably correct once before).
UTF8FromUTF16() now only NUL-terminates the string if there is enough space in
it for the trailing NUL, so pass the correct length of the buffer, including
the last byte reserved for this NUL to this function.
Also allocate one byte less in wxCharBuffer, it was adding 1 extra byte
unnecessarily.
See #16776.
Non-blocking sockets can't work in worker threads without additional locking
as they generate events that can be dispatched from the main thread after the
socket object, created in the worker thread, is already destroyed, so don't
even attempt to use them if wxProtocol object is created from non-main thread.
Also simplify the code by removing the calls to SetFlags(), Notify() and
{Save,Restore}State() and simply put the socket from the beginning in
blocking, wait all mode that it needs to be in.
This, with the fixes in the previous commit, allows wxHTTP and wxFTP to work
from worker threads too.
Test using wxHTTP from a worker thread in the socket client sample.
Closes#17031.
Events are not needed for this kind of sockets, using wxSOCKET_BLOCK is
supposed to ensure that calling socket IO operations blocks until the bytes
are read/written without dispatching any events.
See #17031.
Resolve ambiguity in assignment of wxImage to wxBitmap in wxMSW which also has
wxBitmap::operator=(wxCursor). This should allow the sample to compile under
MSW after the changes of 1fce152d3c.
Call wxPropertyGridpageState::DoSelectProperty with explicitly set flags instead of casting from bool to unisgned int. It cannot be guaranteed that 0/1 values of this implicit conversion will be mapped to the proper flags also int the future.