diff options
author | hobbs <hobbs> | 2001-09-21 20:38:35 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-09-21 20:38:35 (GMT) |
commit | e5568a988e863496a20b1dbfb19c9ed04450e90a (patch) | |
tree | a4c28c5c855fe2829014497973e5ae0f8b9ab734 | |
parent | a1c4d6114615a7794672fd0f929ad729f9163abe (diff) | |
download | tk-e5568a988e863496a20b1dbfb19c9ed04450e90a.zip tk-e5568a988e863496a20b1dbfb19c9ed04450e90a.tar.gz tk-e5568a988e863496a20b1dbfb19c9ed04450e90a.tar.bz2 |
* win/tkWinWm.c (WinSetIcon): fixed SetClassLong for 64bit support.
-rw-r--r-- | win/tkWinWm.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 4353e5b..421c139 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWm.c,v 1.29 2001/03/30 21:52:56 hobbs Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.30 2001/09/21 20:38:35 hobbs Exp $ */ #include "tkWinInt.h" @@ -814,7 +814,15 @@ WinSetIcon(interp, titlebaricon, tkw) } } else { ThreadSpecificData *tsdPtr; - if (!SetClassLong(hwnd, GCL_HICONSM, (LPARAM)GetIcon(titlebaricon, ICON_SMALL))) { + if ( +#ifdef _WIN64 + !SetClassLongPtr(hwnd, GCLP_HICONSM, + (LPARAM)GetIcon(titlebaricon, ICON_SMALL)) +#else + !SetClassLong(hwnd, GCL_HICONSM, + (LPARAM)GetIcon(titlebaricon, ICON_SMALL)) +#endif + ) { /* * For some reason this triggers, even though it seems * to be successful This is probably related to the @@ -827,7 +835,15 @@ WinSetIcon(interp, titlebaricon, tkw) * return TCL_ERROR; */ } - if (!SetClassLong(hwnd, GCL_HICON, (LPARAM)GetIcon(titlebaricon, ICON_BIG))) { + if ( +#ifdef _WIN64 + !SetClassLongPtr(hwnd, GCLP_HICON, + (LPARAM)GetIcon(titlebaricon, ICON_BIG)) +#else + !SetClassLong(hwnd, GCL_HICON, + (LPARAM)GetIcon(titlebaricon, ICON_BIG)) +#endif + ) { Tcl_AppendResult(interp,"Unable to set new icon", (char*)NULL); return TCL_ERROR; } |