summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-11-13 21:32:20 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-11-13 21:32:20 (GMT)
commit78719bde32acd127de584529bc9dab776ad56c1d (patch)
treea88fc25f8f47cabec4b04b5c4d4703e82b89c980 /win
parent9ce1c91223f7eddccf9b4590dac636908f221614 (diff)
parentefee4d5fc9d93a3da7decfba9d738b894bbeaf7b (diff)
downloadtk-78719bde32acd127de584529bc9dab776ad56c1d.zip
tk-78719bde32acd127de584529bc9dab776ad56c1d.tar.gz
tk-78719bde32acd127de584529bc9dab776ad56c1d.tar.bz2
merge trunk
Diffstat (limited to 'win')
-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: {