Show new style Windows directory selector even for non-existent paths.

Passing an invalid initial directory to wxDirDialog resulted in using the old
style Windows directory selector dialog instead of the new style (file dialog
like) one, which was unintentional, as incorrect initial directory shouldn't
prevent the dialog from being shown.

Fix this by handling ERROR_FILE_NOT_FOUND error specifically and still showing
the new dialog, just without the (non existent) initial directory value, in
this case.

Closes #16430.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
fix use of stack variable after it has gone out of scope, closes #16423

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix ribbon bar tab width computation if the first tab is hidden.

The logic for the first tab should really deal with the first visible tab as
the actual first tab might be hidden and in this case we shouldn't account for
it at all.

Closes #16432.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Remove unused variable in wxDCImpl::CalculateEllipticPoints().

Closes #16433.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid warning about unused variable in wxiOS build.

Define variable only used if wxOSX_USE_COCOA_OR_CARBON inside the check for it.

Closes #16435.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid unnecessary assignment in wxOSX build.

Don't assign to the variable only to overwrite it with a new value.

Closes #16436.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix order of radial gradient stops in wxMSW.

Ensure that the order of stops is consistent with the documentation and other
platforms behaviour, i.e. they are counted from inside to outside of the
circle and not vice versa, which happens to be the GDI+ convention.

Closes #16443.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Revision 59305 broke click count adjustment with the result that a right-click after a left-click is reported as double-click.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix wxFont construction from default wxFontInfo in wxMSW.

Don't use -1 as the real point size.

Also update the font sample to allow testing such font.

Closes #16468.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow wxCmdLineParser::Parse() to be called more than once.

Clear the previously collected parameters in the beginning to avoid
accumulating the results from several command lines.

Closes #16503.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No changes, just avoid unnecessary heap allocation in wxHtmlWindow.

Create the temporary wxClientDC on the stack, not the heap, there is no need
for the latter.

See #16501.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't leave wxHtmlWinParser with a dangling wxDC pointer.

Call SetDC(NULL) to prevent wxHtmlWinParser from using a pointer to the
already destroyed wxDC object.

See #16501.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix typo in the last changelog entry.

s/reated/created/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add small wxOleInitializer RAII helper.

Wrap wxOleInitialize()/wxOleUninitialize() in a helper class ensuring that we
never forget to call the latter.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ensure OLE is initialized in wxFileName::GetShortcutTarget().

If it isn't, the function doesn't risk to work. This is especially pernicious
because OLE is initialized on startup in GUI applications, but not in the
console ones only using wxBase, so this function can, completely unexpectedly,
give different results in them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't change a shortcut file name when changing its path.

wxFileName::MakeRelativeTo() is only supposed to change the path of the file,
not its name, but it was doing the latter for the shortcuts as it implicitly
resolved them to the name of their target.

Fix this by ensuring we do not use wxPATH_NORM_SHORTCUT in MakeRelativeTo().

Closes #16239.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix creation of wxBitmap from monochrome wxIcon or wxCursor in wxMSW.

Don't suppose that we always have hbmColor because this is not true for
monochrome icons/cursors. Create our own bitmap in this case.

Closes #16512.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't prevent app exit when only preferences window exists.

Don't prevent termination of the app if all windows are closed, except
for the preferences one (which may very well be hidden at the moment).
This only affects platforms where the preferences are modeless (GTK+, OS
X) and where the preferences window, once created, continues to exist,
but is hidden.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Work around buggy printer drivers not returning correct DEVMODE size.

Apparently at least one printer driver doesn't report the memory needed by its
own DEVMODE struct correctly, resulting in a crash due to a buffer overflow
when printing using it.

Work around this by allocating slightly more memory than what we really need.

Closes #16274.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Include wx/variant.h from wx/msw/ole/oleutils.h.

This ensures that this header is self-contained and can be included without
including wx/variant.h first.

Closes #16522.

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