added wrapper for <commctrl.h> as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
fd68cfdbfb
commit
0d236fd0fa
@ -81,6 +81,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
wx/msw/gccpriv.h
|
||||
wx/msw/mimetype.h
|
||||
wx/msw/winundef.h
|
||||
wx/msw/wrapcctl.h
|
||||
wx/msw/wrapwin.h
|
||||
</set>
|
||||
|
||||
|
47
include/wx/msw/wrapcctl.h
Normal file
47
include/wx/msw/wrapcctl.h
Normal file
@ -0,0 +1,47 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/msw/wrapcctl.h
|
||||
// Purpose: Wrapper for the standard <commctrl.h> header
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 03.08.2003
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MSW_WRAPCCTL_H_
|
||||
#define _WX_MSW_WRAPCCTL_H_
|
||||
|
||||
// define _WIN32_IE to a high value because we always check for the version
|
||||
// of installed DLLs at runtime anyway (see wxApp::GetComCtl32Version()) unless
|
||||
// the user really doesn't want it and had defined it to a (presumably lower)
|
||||
// value
|
||||
//
|
||||
// just for the reference, here is the table showing what the different value
|
||||
// of _WIN32_IE correspond to:
|
||||
//
|
||||
// 0x0200 for comctl32.dll 4.00 shipped with Win95/NT 4.0
|
||||
// 0x0300 4.70 IE 3.x
|
||||
// 0x0400 4.71 IE 4.0
|
||||
// 0x0401 4.72 IE 4.01 and Win98
|
||||
// 0x0500 5.80 IE 5.x
|
||||
// 0x0500 5.81 Win2k/ME
|
||||
// 0x0600 6.00 WinXP
|
||||
|
||||
#ifndef _WIN32_IE
|
||||
// use maximal set of features by default, we check for them during
|
||||
// run-time anyhow
|
||||
#define _WIN32_IE 0x0600
|
||||
#endif // !defined(_WIN32_IE)
|
||||
|
||||
#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
|
||||
#include "wx/msw/gnuwin32/extra.h"
|
||||
#else
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
|
||||
// define things which might be missing from our commctrl.h
|
||||
#include "wx/msw/missing.h"
|
||||
|
||||
#endif // _WX_MSW_WRAPCCTL_H_
|
||||
|
@ -85,33 +85,7 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__WXMICROWIN__)) && !defined(__CYGWIN10__))
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// conditional compilation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// The macro _WIN32_IE is defined by commctrl.h (unless it had already been
|
||||
// defined before) and shows us what common control features are available
|
||||
// during the compile time (it doesn't mean that they will be available during
|
||||
// the run-time, use GetComCtl32Version() to test for them!). The possible
|
||||
// values are:
|
||||
//
|
||||
// 0x0200 for comctl32.dll 4.00 shipped with Win95/NT 4.0
|
||||
// 0x0300 4.70 IE 3.x
|
||||
// 0x0400 4.71 IE 4.0
|
||||
// 0x0401 4.72 IE 4.01 and Win98
|
||||
// 0x0500 5.80 IE 5.x
|
||||
// 0x0500 5.81 Win2k/ME
|
||||
// 0x0600 6.00 WinXP
|
||||
|
||||
#ifndef _WIN32_IE
|
||||
// use maximal set of features by default, we check for them during
|
||||
// run-time anyhow
|
||||
#define _WIN32_IE 0x0600
|
||||
#endif
|
||||
#include "wx/msw/wrapcctl.h"
|
||||
|
||||
#if (!defined(__MINGW32__) || wxCHECK_W32API_VERSION( 2, 0 )) && \
|
||||
!defined(__CYGWIN__) && !defined(__WXWINCE__) && \
|
||||
|
@ -45,13 +45,8 @@
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
|
||||
#include "wx/msw/gnuwin32/extra.h"
|
||||
#else
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
|
||||
#include "wx/msw/missing.h"
|
||||
// include <commctrl.h> "properly"
|
||||
#include "wx/msw/wrapcctl.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private functions
|
||||
|
@ -49,27 +49,11 @@
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
|
||||
#include <commctrl.h>
|
||||
#else
|
||||
#include "wx/msw/gnuwin32/extra.h"
|
||||
#endif
|
||||
|
||||
#include "wx/msw/missing.h"
|
||||
// include <commctrl.h> "properly"
|
||||
#include "wx/msw/wrapcctl.h"
|
||||
|
||||
#include "wx/app.h" // for GetComCtl32Version
|
||||
|
||||
#if defined(__MWERKS__) && defined(__WXMSW__)
|
||||
// including <windef.h> for max definition doesn't seem
|
||||
// to work using CodeWarrior 6 Windows. So we define it
|
||||
// here. (Otherwise we get a undefined identifier 'max'
|
||||
// later on in this file.) (Added by dimitri@shortcut.nl)
|
||||
# ifndef max
|
||||
# define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// conditional compilation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -32,9 +32,8 @@
|
||||
#include "wx/tooltip.h"
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
// include <commctrl.h> "properly"
|
||||
#include "wx/msw/wrapcctl.h"
|
||||
|
||||
// VZ: normally, the trick with subclassing the tooltip control and processing
|
||||
// TTM_WINDOWFROMPOINT should work but, somehow, it doesn't. I leave the
|
||||
|
@ -44,36 +44,8 @@
|
||||
#include "wx/msw/treectrl.h"
|
||||
#include "wx/msw/dragimag.h"
|
||||
|
||||
#ifdef __GNUWIN32_OLD__
|
||||
#include "wx/msw/gnuwin32/extra.h"
|
||||
#endif
|
||||
|
||||
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
|
||||
// Bug in headers, sometimes
|
||||
#ifndef TVIS_FOCUSED
|
||||
#define TVIS_FOCUSED 0x0001
|
||||
#endif
|
||||
|
||||
#ifndef TV_FIRST
|
||||
#define TV_FIRST 0x1100
|
||||
#endif
|
||||
|
||||
#ifndef TVS_CHECKBOXES
|
||||
#define TVS_CHECKBOXES 0x0100
|
||||
#endif
|
||||
|
||||
#ifndef TVS_FULLROWSELECT
|
||||
#define TVS_FULLROWSELECT 0x1000
|
||||
#endif
|
||||
|
||||
// old headers might miss these messages (comctl32.dll 4.71+ only)
|
||||
#ifndef TVM_SETBKCOLOR
|
||||
#define TVM_SETBKCOLOR (TV_FIRST + 29)
|
||||
#define TVM_SETTEXTCOLOR (TV_FIRST + 30)
|
||||
#endif
|
||||
// include <commctrl.h> "properly"
|
||||
#include "wx/msw/wrapcctl.h"
|
||||
|
||||
// macros to hide the cast ugliness
|
||||
// --------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user