summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-08-08 06:57:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-08-08 06:57:01 (GMT)
commit2a966c43ccb10010238cea4c0acf92ea5029dd0e (patch)
treefb615e46b989e0285d8f77cb81abcfd5ccb5f6c8
parent30706e378752cb83c4d3c6f4e2163df306cf786e (diff)
downloadtk-2a966c43ccb10010238cea4c0acf92ea5029dd0e.zip
tk-2a966c43ccb10010238cea4c0acf92ea5029dd0e.tar.gz
tk-2a966c43ccb10010238cea4c0acf92ea5029dd0e.tar.bz2
Replace 2 usages of MessageBoxA() with Unicode variant MessageBoxW()
-rw-r--r--win/tkWinEmbed.c8
-rw-r--r--win/tkWinPixmap.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index 8bfd295..43c5e25 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.c
@@ -200,7 +200,7 @@ void Tk_MapEmbeddedWindow(
* The TK_INFO messages are required in order to verify if the window to
* use is a valid container. Without an id verification, an invalid
* window attachment may cause unexpected crashes/panics (bug 1096074).
- * Additional sub messages may be definded/used in future for other
+ * Additional sub messages may be defined/used in future for other
* needs.
*
* We do not enforce the above protocol for the reason of backward
@@ -303,10 +303,10 @@ TkpUseWindow(
* order to avoid bug 1096074 in future.
*/
- char msg[256];
+ TCHAR msg[256];
- sprintf(msg, "Unable to get information of window \"%.80s\". Attach to this\nwindow may have unpredictable results if it is not a valid container.\n\nPress Ok to proceed or Cancel to abort attaching.", string);
- if (IDCANCEL == MessageBoxA(hwnd, msg, "Tk Warning",
+ wsprintf(msg, TEXT("Unable to get information of window \"%.40hs\". Attach to this\nwindow may have unpredictable results if it is not a valid container.\n\nPress Ok to proceed or Cancel to abort attaching."), string);
+ if (IDCANCEL == MessageBox(hwnd, msg, TEXT("Tk Warning"),
MB_OKCANCEL | MB_ICONWARNING)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"Operation has been canceled", -1));
diff --git a/win/tkWinPixmap.c b/win/tkWinPixmap.c
index 1cf0634..aa1ebde 100644
--- a/win/tkWinPixmap.c
+++ b/win/tkWinPixmap.c
@@ -100,13 +100,13 @@ Tk_GetPixmap(
LPVOID lpMsgBuf;
repeatError = 1;
- if (FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPSTR) &lpMsgBuf, 0, NULL)) {
- MessageBoxA(NULL, (LPCSTR) lpMsgBuf,
- "Tk_GetPixmap: Error from CreateDIBSection",
+ (LPTSTR)&lpMsgBuf, 0, NULL)) {
+ MessageBox(NULL, (LPTSTR) lpMsgBuf,
+ TEXT("Tk_GetPixmap: Error from CreateDIBSection"),
MB_OK | MB_ICONINFORMATION);
LocalFree(lpMsgBuf);
}