Fix wxTextCtrl contents corruption with long strings in wxMSW.

wxMSW automatically extended wxTextCtrl length limit beyond the tiny standard
32KB when it was exceeded, but part of the text being appended into the
control was lost when doing it.

Fix this by retrying insertion after extending the limit.

Closes #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use invalid pointer in file dialog hook procedure in wxMSW.

We can receive WM_NOTIFY for other than CDN_XXX messages if we have a native
control as our immediate child (which can happen with "extra" controls) and
the LPARAM is not a pointer to OFNOTIFY at all in this case, so don't try to
use it as such.

This fixes a crash when adding a "bare" extra control, see #16003.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Reduce code duplication in wxCmdLineParser implementation.

No real changes, just extract the code for finding options from their names
into a separate function instead of repeating it 4 (and 5, after the next
commit changes) times.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix wxCmdLineParser::Found(name) for options with values.

Calling Found() without providing the second "value" argument started
generating an assert since introduction of the negated options as it reused
FoundSwitch() which can only be used for switches, i.e. options without
values.

Fix this to revert a regression since 2.8 and also add unit tests for the
different Found() overloads.

Closes #15986, #16001.

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