summaryrefslogtreecommitdiffstats
path: root/win/tkWinTest.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-11 08:50:50 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-11 08:50:50 (GMT)
commit902f5496fc385aac6e791e1b6c296f1031e2d6d1 (patch)
tree29d114ae2fc044e81024582c935fa2195a0cb56d /win/tkWinTest.c
parent9d7efecc861c41eb04d3a9da2dea7a513746113b (diff)
downloadtk-902f5496fc385aac6e791e1b6c296f1031e2d6d1.zip
tk-902f5496fc385aac6e791e1b6c296f1031e2d6d1.tar.gz
tk-902f5496fc385aac6e791e1b6c296f1031e2d6d1.tar.bz2
Fixed, but only tested yet on Windows 7. On other platforms, at least the 'user input problem' is gone, but the test might still fail.
Diffstat (limited to 'win/tkWinTest.c')
-rw-r--r--win/tkWinTest.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/win/tkWinTest.c b/win/tkWinTest.c
index d7d4d0f..3dd7d7a 100644
--- a/win/tkWinTest.c
+++ b/win/tkWinTest.c
@@ -335,10 +335,16 @@ TestwineventCmd(
}
case WM_SETTEXT: {
Tcl_DString ds;
+ BOOL result;
Tcl_UtfToExternalDString(NULL, argv[4], -1, &ds);
- SetDlgItemTextA(hwnd, id, Tcl_DStringValue(&ds));
+ result = SetDlgItemTextA(hwnd, id, Tcl_DStringValue(&ds));
Tcl_DStringFree(&ds);
+ if (result == 0) {
+ Tcl_SetResult(interp, "failed to send text to dialog: ", TCL_STATIC);
+ AppendSystemError(interp, GetLastError());
+ return TCL_ERROR;
+ }
break;
}
case WM_COMMAND: {