diff options
author | hobbs <hobbs> | 2000-11-03 01:22:16 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2000-11-03 01:22:16 (GMT) |
commit | 788680db0e6198c631a5b63066a21e6749cad38b (patch) | |
tree | a0b9272393eee9e4aaf17c795e92a28278d20b8c /win/tkWinButton.c | |
parent | bd04e28031219d0fe2d9b5040d17ba7f1220bca5 (diff) | |
download | tk-788680db0e6198c631a5b63066a21e6749cad38b.zip tk-788680db0e6198c631a5b63066a21e6749cad38b.tar.gz tk-788680db0e6198c631a5b63066a21e6749cad38b.tar.bz2 |
* win/tkWinButton.c:
* win/tkWinDialog.c:
* win/tkWinScrlbr.c:
* win/tkWinWm.c: fixed up code for Win64 support. This mostly
remains in _WIN64 #ifdef's, until updated compilers are standard.
Diffstat (limited to 'win/tkWinButton.c')
-rw-r--r-- | win/tkWinButton.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/win/tkWinButton.c b/win/tkWinButton.c index aa35dd7..1aff26b 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinButton.c,v 1.10 2000/07/06 03:17:44 mo Exp $ + * RCS: @(#) $Id: tkWinButton.c,v 1.11 2000/11/03 01:22:16 hobbs Exp $ */ #define OEMRESOURCE @@ -271,8 +271,13 @@ CreateProc(tkwin, parentWin, instanceData) parent, NULL, Tk_GetHINSTANCE(), NULL); SetWindowPos(butPtr->hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); +#ifdef _WIN64 + butPtr->oldProc = (WNDPROC)SetWindowLongPtr(butPtr->hwnd, GWLP_WNDPROC, + (LONG_PTR) ButtonProc); +#else butPtr->oldProc = (WNDPROC)SetWindowLong(butPtr->hwnd, GWL_WNDPROC, (DWORD) ButtonProc); +#endif window = Tk_AttachHWND(tkwin, butPtr->hwnd); return window; @@ -301,7 +306,11 @@ TkpDestroyButton(butPtr) WinButton *winButPtr = (WinButton *)butPtr; HWND hwnd = winButPtr->hwnd; if (hwnd) { +#ifdef _WIN64 + SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) winButPtr->oldProc); +#else SetWindowLong(hwnd, GWL_WNDPROC, (DWORD) winButPtr->oldProc); +#endif } } |