summaryrefslogtreecommitdiffstats
path: root/win/tkWinEmbed.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 13:31:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 13:31:51 (GMT)
commit907e2d9a2d64d70bf11090c1404f4c2a033665cc (patch)
tree10fef8916f8c8669ce5e3e9dad5ab679a7afd436 /win/tkWinEmbed.c
parentb5ded31c01970fcfc89f40ec2f1ba09472ec0ff2 (diff)
parent31e3c7c6744ec46a8b36c6425b93c58bd5e70230 (diff)
downloadtk-907e2d9a2d64d70bf11090c1404f4c2a033665cc.zip
tk-907e2d9a2d64d70bf11090c1404f4c2a033665cc.tar.gz
tk-907e2d9a2d64d70bf11090c1404f4c2a033665cc.tar.bz2
[Bug 3388350] mingw64 compiler warnings
Diffstat (limited to 'win/tkWinEmbed.c')
-rw-r--r--win/tkWinEmbed.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index 1a6ece3..43cd419 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.c
@@ -259,7 +259,7 @@ TkpUseWindow(
if (Tcl_GetInt(interp, string, &id) != TCL_OK) {
return TCL_ERROR;
}
- hwnd = (HWND) id;
+ hwnd = (HWND) INT2PTR(id);
if ((HWND)winPtr->privatePtr == hwnd) {
return TCL_OK;
}
@@ -279,12 +279,12 @@ TkpUseWindow(
}
id = SendMessage(hwnd, TK_INFO, TK_CONTAINER_VERIFY, 0);
- if (id == (long)hwnd) {
+ if (id == PTR2INT(hwnd)) {
if (!SendMessage(hwnd, TK_INFO, TK_CONTAINER_ISAVAILABLE, 0)) {
Tcl_AppendResult(interp, "The container is already in use", NULL);
return TCL_ERROR;
}
- } else if (id == -(long)hwnd) {
+ } else if (id == -PTR2INT(hwnd)) {
Tcl_AppendResult(interp, "the window to use is not a Tk container",
NULL);
return TCL_ERROR;
@@ -457,7 +457,7 @@ TkWinEmbeddedEventProc(
result = containerPtr->embeddedHWnd == NULL? 1:0;
break;
case TK_CONTAINER_VERIFY:
- result = (long)containerPtr->parentHWnd;
+ result = PTR2INT(containerPtr->parentHWnd);
break;
default:
result = 0;
@@ -495,7 +495,7 @@ TkWinEmbeddedEventProc(
}
containerPtr->embeddedHWnd = (HWND)wParam;
}
- result = (long)containerPtr->parentHWnd;
+ result = PTR2INT(containerPtr->parentHWnd);
} else {
result = 0;
}
@@ -568,14 +568,14 @@ TkWinEmbeddedEventProc(
* returned.
*/
if (topwinPtr) {
- result = (long)GetParent(containerPtr->parentHWnd);
+ result = PTR2INT(GetParent(containerPtr->parentHWnd));
} else {
topwinPtr = containerPtr->parentPtr;
while (!(topwinPtr->flags & TK_TOP_HIERARCHY)) {
topwinPtr = topwinPtr->parentPtr;
}
if (topwinPtr && topwinPtr->window) {
- result = (long)GetParent(Tk_GetHWND(topwinPtr->window));
+ result = PTR2INT(GetParent(Tk_GetHWND(topwinPtr->window)));
} else {
result = 0;
}
@@ -759,7 +759,7 @@ TkWinEmbeddedEventProc(
* Reply the message sender: this is not a Tk container
*/
- return -(long)hwnd;
+ return -PTR2INT(hwnd);
} else {
result = 0;
}