diff options
author | davygrvy <davygrvy> | 2003-12-13 01:50:29 (GMT) |
---|---|---|
committer | davygrvy <davygrvy> | 2003-12-13 01:50:29 (GMT) |
commit | 71a469a824e936ea803cec5ef88a8e45f2993fe3 (patch) | |
tree | 3249b3f5c46e9f989880e0b1be7a13619f513752 /win/tkWinX.c | |
parent | da421b06aabbad5ae0fda73bdfc4796e677a59da (diff) | |
download | tk-71a469a824e936ea803cec5ef88a8e45f2993fe3.zip tk-71a469a824e936ea803cec5ef88a8e45f2993fe3.tar.gz tk-71a469a824e936ea803cec5ef88a8e45f2993fe3.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/tkWinX.c')
-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; |