summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tkWinInit.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/win/tkWinInit.c b/win/tkWinInit.c
index 8426551..f071eef 100644
--- a/win/tkWinInit.c
+++ b/win/tkWinInit.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinInit.c,v 1.4 2000/03/31 09:24:27 hobbs Exp $
+ * RCS: @(#) $Id: tkWinInit.c,v 1.5 2001/12/28 02:14:41 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -122,6 +122,13 @@ TkpDisplayWarning(msg, title)
char *msg; /* Message to be displayed. */
char *title; /* Title of warning. */
{
- MessageBox(NULL, msg, title, MB_OK | MB_ICONEXCLAMATION | MB_SYSTEMMODAL
+ Tcl_Encoding unicodeEncoding = Tcl_GetEncoding(NULL, "unicode");
+ Tcl_DString msgString, titleString;
+
+ Tcl_UtfToExternalDString(unicodeEncoding, msg, -1, &msgString);
+ Tcl_UtfToExternalDString(unicodeEncoding, title, -1, &titleString);
+ MessageBoxW(NULL, (WCHAR *) Tcl_DStringValue(&msgString),
+ (WCHAR *) Tcl_DStringValue(&titleString),
+ MB_OK | MB_ICONEXCLAMATION | MB_SYSTEMMODAL
| MB_SETFOREGROUND | MB_TOPMOST);
}