## Version macros

The following constants are defined in wxWindows:

- `wxMAJOR_VERSION` is the major version of wxWindows
- `wxMINOR_VERSION` is the minor version of wxWindows
- `wxRELASE_NUMBER` is the release number

For example, the values or these constants for wxWindows 2.1.15 are 2, 1 and 15.

Additionally, `wxVERSION_STRING` is a user-readable string containing the full wxWindows version and `wxVERSION_NUMBER` is a combination of the three version numbers above: for 2.1.15, it is 2115 and it is 2200 for wxWindows 2.2.

Include files

<wx/version.h> or <wx/defs.h>

wxCHECK_VERSION

### wxCHECK_VERSION

bool wxCHECK_VERSION(major, minor, release)

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

For example, to test if the program is compiled with wxWindows 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
        {
            ...
        }