wxWidgets: interface/wx/version.h File Reference

| Version: 3.1.5

Loading...
Searching...
No Matches
Macros
version.h File Reference

## Macros
#define | wxCHECK_VERSION(major, minor, release)
| This is a macro which evaluates to true if the current wxWidgets version is at least major.minor.release.
#define | wxCHECK_VERSION_FULL(major, minor, release, subrel)
| Same as wxCHECK_VERSION() but also checks that wxSUBRELEASE_NUMBER is at least subrel.

## Macro Definition Documentation

## ◆ wxCHECK_VERSION

#define wxCHECK_VERSION | ( |  | major,
|  |  | minor,
|  |  | release )

This is a macro which evaluates to true if the current wxWidgets version is at least major.minor.release.

For example, to test if the program is compiled with wxWidgets 2.2 or higher, the following can be done:

wxString s;
#if wxCHECK_VERSION(2, 2, 0)
if ( s.StartsWith("foo") )
#else // replacement code for old version
if ( strncmp(s, "foo", 3) == 0 )
#endif
{
...
}
wxString
String class for passing textual data to or receiving it from wxWidgets.
Definition string.h:315
wxString::StartsWith
bool StartsWith(const wxString &prefix, wxString *rest=NULL) const
This function can be used to test if the string starts with the specified prefix.

Include file:

    #include <wx/version.h>

## ◆ wxCHECK_VERSION_FULL

#define wxCHECK_VERSION_FULL | ( |  | major,
|  |  | minor,
|  |  | release,
|  |  | subrel )

Same as wxCHECK_VERSION() but also checks that wxSUBRELEASE_NUMBER is at least subrel.

Include file:

    #include <wx/version.h>