From d1b8e1178cde9bd9858bd427a2dcc665ad903152 Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 10 Nov 2001 00:58:51 +0000 Subject: * 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] --- ChangeLog | 16 ++++++++++++++++ win/rc/tk.rc | 14 +++++++++++++- win/rc/wish.exe.manifest | 22 ++++++++++++++++++++++ win/rc/wish.rc | 14 +++++++++++++- win/tkWinX.c | 14 +++++++++++++- 5 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 win/rc/wish.exe.manifest diff --git a/ChangeLog b/ChangeLog index 9e98a58..87ef0f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2001-11-09 Jeff Hobbs + + * unix/configure: + * unix/tcl.m4: added -lc to AIX libs, fixed path to ldAix + + * win/configure: + * win/tcl.m4: + * win/makefile.vc: add comctl32.lib to build libs. + * 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] + 2001-11-09 Mo DeJong * unix/configure: diff --git a/win/rc/tk.rc b/win/rc/tk.rc index cdc1e6d..bdca9cd 100644 --- a/win/rc/tk.rc +++ b/win/rc/tk.rc @@ -1,4 +1,4 @@ -// RCS: @(#) $Id: tk.rc,v 1.7 2001/10/01 21:04:07 hobbs Exp $ +// RCS: @(#) $Id: tk.rc,v 1.8 2001/11/10 00:58:51 hobbs Exp $ // // Version Resource Script // @@ -67,3 +67,15 @@ END // #include "tk_base.rc" + +// +// This enables themed scrollbars in XP by trying to use comctl32 v6. +// + +#ifndef RT_MANIFEST +#define RT_MANIFEST 24 +#endif +#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID +#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 +#endif +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "wish.exe.manifest" diff --git a/win/rc/wish.exe.manifest b/win/rc/wish.exe.manifest new file mode 100644 index 0000000..424000f --- /dev/null +++ b/win/rc/wish.exe.manifest @@ -0,0 +1,22 @@ + + + +Tcl/Tk windowing shell (wish) + + + + + + diff --git a/win/rc/wish.rc b/win/rc/wish.rc index 7d6ce2c..d10a200 100644 --- a/win/rc/wish.rc +++ b/win/rc/wish.rc @@ -1,4 +1,4 @@ -// RCS: @(#) $Id: wish.rc,v 1.6 2001/10/01 21:04:07 hobbs Exp $ +// RCS: @(#) $Id: wish.rc,v 1.7 2001/11/10 00:58:51 hobbs Exp $ // // Version Resource Script // @@ -79,3 +79,15 @@ app ICON DISCARDABLE "wish.ico" #ifdef STATIC_BUILD #include "tk_base.rc" #endif + +// +// This enables themed scrollbars in XP by trying to use comctl32 v6. +// + +#ifndef RT_MANIFEST +#define RT_MANIFEST 24 +#endif +#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID +#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 +#endif +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "wish.exe.manifest" 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 /* * 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; /* -- cgit v0.12