diff options
author | davygrvy <davygrvy> | 2003-12-13 01:50:29 (GMT) |
---|---|---|
committer | davygrvy <davygrvy> | 2003-12-13 01:50:29 (GMT) |
commit | ef801a9b0cc56519e689094372f6d38f8ad6960a (patch) | |
tree | 3249b3f5c46e9f989880e0b1be7a13619f513752 | |
parent | 55aafc442afd563c3615532d4095ce44f36283d5 (diff) | |
download | tk-ef801a9b0cc56519e689094372f6d38f8ad6960a.zip tk-ef801a9b0cc56519e689094372f6d38f8ad6960a.tar.gz tk-ef801a9b0cc56519e689094372f6d38f8ad6960a.tar.bz2 |
(TkWinXInit): Don't restric InitCommonControlsEx. It's valid on all platforms
given IE 3.0+ is installed. As tkWinX.c does set #define _WIN32_IE 0x0300,
I guess we can accept IE3 as the lowest denominator and use version 4.71
features of Comctl32.dll
-rw-r--r-- | win/tkWinX.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c index ae21e4b..6a1e292 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -10,7 +10,7 @@ * 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.25 2002/12/08 00:46:51 hobbs Exp $ + * RCS: @(#) $Id: tkWinX.c,v 1.26 2003/12/13 01:50:29 davygrvy Exp $ */ #include "tkWinInt.h" @@ -221,21 +221,20 @@ void TkWinXInit(hInstance) HINSTANCE hInstance; { + INITCOMMONCONTROLSEX comctl; + if (childClassInitialized != 0) { return; } 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); + comctl.dwSize = sizeof(INITCOMMONCONTROLSEX); + comctl.dwICC = ICC_WIN95_CLASSES; + if (!InitCommonControlsEx(&comctl)) { + Tcl_Panic("Unable to load common controls?!"); + } + if (TkWinGetPlatformId() == VER_PLATFORM_WIN32_NT) { tkWinProcs = &unicodeProcs; } else { tkWinProcs = &asciiProcs; |