Include wx/defs.h to get wxUSE_DIRDLG value from it, otherwise it could be
undefined, and hence evaluate to 0 (unfortunately without even a warning with
some compilers), if this header was the first wx header to be included.
We don't need to change the selection if we're interested in the attribute of
its starting position, as is typically the case because this is also the
cursor position, because EM_GETCHARFORMAT returns the attribute of the first
character of the selection and not, as was apparently believed when this code
was written, only the attributes which are the same for the whole selection.
This avoids flicker when constantly using GetStyle() to check for the format
at the cursor position as the selection is not changed all the time any more.
When converting internal bitmap to wxImage in wxGDIPlusBitmapData::ConvertToImage set up output alpha channel buffer only if source bitmap contains alpha channel values.
Get access to bitmap bits with IWICBitmap::Lock instead of IWICBitmapSource::CopyPixels because in-place processing is more effective in terms of speed and memory consumption (see IWICBitmap interface description in MSDN).
See #17311.
Save alpha channel retrieved from internal bitmap if target wxImage is capable to store it. Also undo premultiplication of RGB values if bitmap contains alpha channel values.
Closes#17311.
This symbol can now be predefined to avoid conflicts with mode_t definition in
wx/filefn.h when wxWidgets is used in applications also using another library
which also defines mode_t.
Closes https://github.com/wxWidgets/wxWidgets/pull/165
wxGDIPlusBitmapData::ConvertToImage() lost the alpha channel of the image as
it used the bitmap handle returned Gdiplus::Bitmap::GetHBITMAP() which is a
DDB and doesn't contain real alpha channel values.
In order to retrieve actual alpha channel data there is necessary to get
direct access to Gdiplus::Bitmap bits with Bitmap::LockBits and transfer pixel
data to wxImage pixel by pixel.
Closes#17174.
This file is used by the public wx/collheaderctrl.h but wasn't previously
installed, breaking the build of any code including that header under Unix.
Closes#17309.
This symbol was wrongly added to include/wx/msw/setup0.h directly in
075ef6551e, so it didn't work when
cross-compiling from Unix (which doesn't use this file) and would have been
lost after any future modification of include/wx/setup_inc.h where it should
have been added in the first place.
Do this now and also make the check for this symbol in wx/progdlg.h a bit more
readable.
Don't use __STRICT_ANSI__ to determine whether a function is available or not
as its value can be different when building the library and the application,
resulting in mysterious link errors.
Instead use the same approach as in aa30a2f97ade6fe019f2f288917296b009bf4221
and just declare the functions that are available but just not declared in
strict ANSI mode manually.
Closes#15793.
This reverts commit 6caa5e92c1 because it fixed
a warning during compilation but broke the behaviour of TIFFFdOpen() during
run-time: initializing the union via its int component didn't clear the high
DWORD of the 64 bit thandle_t value, resulting in a wrong value being used.
Closes#17286.
Because graphics renderer is not only selected via menu but also directly in the application (in MyFrame::OnShow) there is necessary to update menu items responsible for selecting graphics context to represent current state of the application.
This is done in EVT_UPDATE_UI handlers where there is checked what graphics renderer is currently in use and state of the menu items is updated accordingly.
Closes#16971.
When drop-down list is open for wxBitmapComboBox with wxCB_READONLY style and
keyboard is used to select the item on the list then the contents of the
selection field should remain unchanged. (Especially, the bitmap bitmap drawn
in the selection field should be the bitmap associated with text value
displayed in this field.)
Closes#17299.
If a wxStaticBox is rendered, but has zero size in either dimension we
generate assert failures when creating the bitmap. Check for these conditions
and just do not render if this is the case.
Closes#17288.
Extended ZIP64 data are stored in the field with Header ID = 1 and we need to
iterate over all fields to find it because it is not stated in the
documentation the it must be the first record in the collection. wxZipHeader
is designed to process standard 64-byte headers and it is safe to use it to
process data in the field with Header ID = 1 which can have up to 28 bytes.
Closes#17170.
When using a C++11 compiler, it is very convenient to use lambdas directly as
event handlers, so explicitly give an example of doing this in the
documentation.
Closes#17294.
Tool padding value should be taken into account also in sizing custom made tools (with controls) to get the same visual appearance and behaviour for all tools (buttons).
Don't set orthogonal padding value to zero but preserve its current value (using MSWSetPadding method).
This way vertical padding is not zeroed when horizontal padding is set and horizontal padding is not zeroed when vertical padding is set.
If padding value (stored in m_toolPacking) has been assigned prior to creating the toolbar (with SetToolPacking) then apply this padding to just created toolbar.
Otherwise initialize this variable with current padding retrieved from the toolbar to let GetToolPacking return proper padding value.
Implemented new method MSWSetPadding() to set padding for native toolbar.
There were added two menu items (under 'Tools' menu) to modify current tool spacing.
This way is possible to test SetToolPacking/GetToolPacking methods.