diff options
author | davygrvy <davygrvy> | 2003-12-13 01:50:29 (GMT) |
---|---|---|
committer | davygrvy <davygrvy> | 2003-12-13 01:50:29 (GMT) |
commit | 3879d0da6b57e5c94b7f84e9267729516bf37cf9 (patch) | |
tree | 3249b3f5c46e9f989880e0b1be7a13619f513752 /win | |
parent | d3f99065b354a6beb952f98c775788c1d9708f37 (diff) | |
download | tk-3879d0da6b57e5c94b7f84e9267729516bf37cf9.zip tk-3879d0da6b57e5c94b7f84e9267729516bf37cf9.tar.gz tk-3879d0da6b57e5c94b7f84e9267729516bf37cf9.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
Diffstat (limited to 'win')
-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; |