diff options
author | hobbs <hobbs@noemail.net> | 2000-11-03 01:22:15 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2000-11-03 01:22:15 (GMT) |
commit | fea6da26057dd6fd7be79a9adb503f4123af829c (patch) | |
tree | a0b9272393eee9e4aaf17c795e92a28278d20b8c /win/tkWinButton.c | |
parent | 1e956f26f4f60f00ad493d38ab01daa3dc5608f9 (diff) | |
download | tk-fea6da26057dd6fd7be79a9adb503f4123af829c.zip tk-fea6da26057dd6fd7be79a9adb503f4123af829c.tar.gz tk-fea6da26057dd6fd7be79a9adb503f4123af829c.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.
FossilOrigin-Name: 5ecc849554894ba1b41dcaac71afd55dbe4c6e9b
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 } } |