summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2015-11-10 13:54:09 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2015-11-10 13:54:09 (GMT)
commit508dededc1a13321530520f370d51ad04c354c41 (patch)
tree2e19a516c08dfef92ca282596e4174a5dc32daaf /win
parent309ddbe8b22a689ba1c6ed0cf828c55489dfebe4 (diff)
downloadtk-508dededc1a13321530520f370d51ad04c354c41.zip
tk-508dededc1a13321530520f370d51ad04c354c41.tar.gz
tk-508dededc1a13321530520f370d51ad04c354c41.tar.bz2
Fix [5ee8af61e5ef8e233158a43459624f4ecf58a6fe|5ee8af61e5] on Win64: Window embedding can not work on 64-bit Unix and Windows
Diffstat (limited to 'win')
-rw-r--r--win/tkWinEmbed.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index b7f5085..a0670cc 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.c
@@ -256,10 +256,13 @@ TkpUseWindow(
return TCL_OK;
}
- if (Tcl_GetInt(interp, string, &id) != TCL_OK) {
+ if (
+#ifdef _WIN64
+ (sscanf(string, "0x%p", &hwnd) != 1) &&
+#endif
+ Tcl_GetInt(interp, string, (int *) &hwnd) != TCL_OK) {
return TCL_ERROR;
}
- hwnd = (HWND) INT2PTR(id);
if ((HWND)winPtr->privatePtr == hwnd) {
return TCL_OK;
}