summaryrefslogtreecommitdiffstats
path: root/win/tkWinEmbed.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-11-10 13:57:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-11-10 13:57:41 (GMT)
commit39759c5edb64b64dbc156e6ae955724d399a228e (patch)
tree7985516348d53cef2b80c68b96ca778314a65ef9 /win/tkWinEmbed.c
parent9eb72f5e699be0285d04f0408799b0a70144213e (diff)
parente1f916d469ab9cd121e46b22a73ee385e56140f8 (diff)
downloadtk-39759c5edb64b64dbc156e6ae955724d399a228e.zip
tk-39759c5edb64b64dbc156e6ae955724d399a228e.tar.gz
tk-39759c5edb64b64dbc156e6ae955724d399a228e.tar.bz2
Fix [5ee8af61e5ef8e233158a43459624f4ecf58a6fe|5ee8af61e5] on Win64: Window embedding can not work on 64-bit Unix and Windows
Diffstat (limited to 'win/tkWinEmbed.c')
-rw-r--r--win/tkWinEmbed.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index 42809cc..8bfd295 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.c
@@ -257,10 +257,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;
}