wxFileOffset and ssize_t are not the same type under this platform so using
CPPUNIT_ASSERT_EQUAL() with the arguments of these types fails. Use ssize_t
instead of wxFileOffset to fix this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Empty value refers to the default or unnamed key in Win32 API but this may be
not clear to people unused to it so mention this explicitly.
Closes#11191.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function was broken for conversions using more than one byte per
character (e.g. UTF-16 or UTF-32) and also even for UTF-8 for strings
containing NUL bytes as it used strlen() to determine the number of bytes to
write out instead of using the really needed number.
Fix this by using the wxCharBuffer::length() method which always returns the
correct value.
Also add a wxFile unit test verifying that it can correctly read back a string
written using any of UTF-8, UTF-16 or UTF-32.
Closes#11192.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to reuse it in the other tests which need to create a temporary
file automatically destroyed on test exit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These overloads allow not to worry about buffer lengths and just convert
between wxCharBuffer and wxWCharBuffer directly in a convenient way.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We must unregister the wake up pipe file descriptor which we register with the
IO dispatcher in wxConsoleEventLoop ctor, otherwise doing it the next time
(i.e. if wxConsoleEventLoop is deleted and recreated) results in asserts, at
least when using wxSelectDispatcher and not wxEpollDispatcher (i.e. under any
non-Linux Unix system).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Bakefile for this program doesn't exist so its makefiles are out of date and
it doesn't build any more now, disable its build until the bakefile is checked
in.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This should have been committed together with the changes to the debug flags
handling in build/bakefiles in r61887.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It doesn't make sense to select debug or release build of wxWidgets any more
as they are now compatible under Unix. Under Windows the option is still
needed but it selects the build using debug (or not) version of the CRT rather
than the one built with __WXDEBUG__ defined.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Under Unix wxDEBUG_LEVEL can be set using configure --enable-debug=max option
but under Windows it needs to be changed in wx/msw/setup.h so add it to this
file with a comment explaining its meaning.
Also document this symbol with the other preprocessor constants.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Remove "d" suffix from the libraries and the BUILD variable which is not used
any longer.
Also ignore (but still support, for compatibility) --debug option in wx-config.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also disable sizer-drawing code unless wxDEBUG_LEVEL>=2 as we don't want it to
be available in production versions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
By default include assertions and debug logging in both debug and release
builds but disable them in application release builds (when NDEBUG is
defined).
Also update (more accurately, replace) debugging overview.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The background colour for the HDC used for drawing the native controls wasn't
set correctly any more after changes of r61859 but we do need to call it or
the text in edit and similar controls is drawn using the default background
even if we return the correct brush which is used for erasing the control.
Closes#11190.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The change in the values returned by wxStandardPaths functions is important as
it's incompatible with 2.8 if the application defines a vendor name so must be
mentioned in docs/changes.txt.
Also update the documentation of the class itself and mention UseAppInfo() in
the overview.
Closes#11189.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
and wxPG_EX_TOOLBAR_SEPARATOR styles for finer control over borders.
Borders around property grid are now native for consistency.
Some strange VC6 compiler errors fixed, plus size assertion in
sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead of hard-coding GetSysColor(COLOR_WINDOWTEXT), use
GetForegroundColour() which will call GetDefaultAttributes() to retrieve the
default foreground appropriate for this control.
This also allows to make the code simpler by calling SetTextColor() only once.
See #1691.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The wxColour argument taken by wxControl::DoMSWControlColor() allows to
override the default colour, it shouldn't be used in MSWControlColor() as this
resulted in always using custom colours for the controls, even when the user
hadn't changed them. Fix this by not passing any valid colour to it in this
case and allowing it to deduce the correct colour to use on its own.
See #1691.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The default colours for this control are wxTextCtrl-like and not wxButton-like
(which is the default). Override GetDefaultAttributes() to indicate this and
to avoid returning a wrong background from wxControl::DoMSWControlColor() when
just a foreground is set.
See #1691.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Define WX_DEFINE_GLOBAL_VAR macro when wxUSE_THREADS==0 too, it is used for
components level hash map in any case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using 32bpp image lists (ILC_COLOR32) is required as we need to be able to put
32bpp bitmaps in them and results in better (albeit still broken, see #9050)
display when the display depth is < 32.
This change was tested under Windows 2000, 2003 and Vista in 8 (Win2k-only),
16 and 32bpp display depth modes.
Closes#11031.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Update the event sample to define (as) many (as possible) event handlers for a
test button and log messages in all of the handlers to leave a trace of the
order in which they were executed.
Add a pointer to this feature of the event sample to the events overview.
Closes#11156.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775