summaryrefslogtreecommitdiffstats
path: root/win/tkWinEmbed.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 13:03:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 13:03:43 (GMT)
commit3876ba4df3e26ded567937787afa2068b9815626 (patch)
treec4452046a4a872fb20c9437f5719b664baca41d7 /win/tkWinEmbed.c
parentaf28c015d3494e872c4094934f33251157662310 (diff)
parent664a327665c85de251423f7a679879e8382041c8 (diff)
downloadtk-3876ba4df3e26ded567937787afa2068b9815626.zip
tk-3876ba4df3e26ded567937787afa2068b9815626.tar.gz
tk-3876ba4df3e26ded567937787afa2068b9815626.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 bc86019..b7f5085 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;
}