summaryrefslogtreecommitdiffstats
path: root/win/tkWinX.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-11-10 00:58:51 (GMT)
committerhobbs <hobbs>2001-11-10 00:58:51 (GMT)
commitd1b8e1178cde9bd9858bd427a2dcc665ad903152 (patch)
treec9f7b72e38056d27ab878e183527d70a558529f5 /win/tkWinX.c
parentee3ea0d53f192b513fb7274babd79e1357ba7316 (diff)
downloadtk-d1b8e1178cde9bd9858bd427a2dcc665ad903152.zip
tk-d1b8e1178cde9bd9858bd427a2dcc665ad903152.tar.gz
tk-d1b8e1178cde9bd9858bd427a2dcc665ad903152.tar.bz2
* win/tkWinX.c (TkWinXInit): added InitCommonControlsEx call.
* win/rc/tk.rc: * win/rc/wish.rc: * win/rc/wish.exe.manifest: added resources that specify using v6 of the MS Common Controls library when available (WinXP+). This enables use of the themeable widgets (like scrollbars) to be used in Tk. [Patch #478933]
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r--win/tkWinX.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c
index 3599bd0..e7ec13d 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -10,10 +10,11 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinX.c,v 1.15 2001/09/21 21:26:09 hobbs Exp $
+ * RCS: @(#) $Id: tkWinX.c,v 1.16 2001/11/10 00:58:51 hobbs Exp $
*/
#include "tkWinInt.h"
+#include <commctrl.h>
/*
* The zmouse.h file includes the definition for WM_MOUSEWHEEL.
@@ -154,6 +155,17 @@ TkWinXInit(hInstance)
}
childClassInitialized = 1;
+ if (TkWinGetPlatformId() == VER_PLATFORM_WIN32_NT) {
+ /*
+ * This is necessary to enable the use of themeable elements on XP,
+ * so we don't even try and call it for Win9*.
+ */
+
+ INITCOMMONCONTROLSEX comctl;
+ ZeroMemory(&comctl, sizeof(comctl));
+ (void) InitCommonControlsEx(&comctl);
+ }
+
tkInstance = hInstance;
/*