diff options
author | hobbs <hobbs@noemail.net> | 2004-05-03 22:40:30 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2004-05-03 22:40:30 (GMT) |
commit | 2cb9474b10d56abd4603b599f575b3ef1218b718 (patch) | |
tree | 0991e2d295fa96e9ed3e196167233c1475098e3e /win | |
parent | e75cd68314b4403e3066a70235810229e5290f57 (diff) | |
download | tk-2cb9474b10d56abd4603b599f575b3ef1218b718.zip tk-2cb9474b10d56abd4603b599f575b3ef1218b718.tar.gz tk-2cb9474b10d56abd4603b599f575b3ef1218b718.tar.bz2 |
* win/tkWinX.c: fix drawing of unicode chars in menu
* win/tkWinInt.h (TkWinProcs): titles. [Bug #904371] (riefenstahl)
* win/tkWinMenu.c (ReconfigureWindowsMenu):
FossilOrigin-Name: 2a201db47c176e0a087b64b533ba551277ffa592
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinInt.h | 4 | ||||
-rw-r--r-- | win/tkWinMenu.c | 7 | ||||
-rw-r--r-- | win/tkWinX.c | 6 |
3 files changed, 12 insertions, 5 deletions
diff --git a/win/tkWinInt.h b/win/tkWinInt.h index cbe2290..17e8d14 100644 --- a/win/tkWinInt.h +++ b/win/tkWinInt.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinInt.h,v 1.14 2003/02/26 02:47:05 hobbs Exp $ + * RCS: @(#) $Id: tkWinInt.h,v 1.15 2004/05/03 22:40:30 hobbs Exp $ */ #ifndef _TKWININT @@ -187,6 +187,8 @@ typedef struct TkWinProcs { LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam); + BOOL (WINAPI *insertMenu)(HMENU hMenu, UINT uPosition, UINT uFlags, + UINT uIDNewItem, LPCTSTR lpNewItem); } TkWinProcs; EXTERN TkWinProcs *tkWinProcs; diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index be00a5f..69f8eb7 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.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: tkWinMenu.c,v 1.31 2004/01/07 13:25:56 vincentdarley Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.32 2004/05/03 22:40:30 hobbs Exp $ */ #define OEMRESOURCE @@ -574,7 +574,7 @@ ReconfigureWindowsMenu( itemText = GetEntryText(mePtr); if ((menuPtr->menuType == MENUBAR) || (menuPtr->menuFlags & MENU_SYSTEM_MENU)) { - Tcl_UtfToExternalDString(NULL, itemText, -1, &translatedText); + Tcl_WinUtfToTChar(itemText, -1, &translatedText); lpNewItem = Tcl_DStringValue(&translatedText); flags |= MF_STRING; } else { @@ -686,7 +686,8 @@ ReconfigureWindowsMenu( } } if (!systemMenu) { - InsertMenu(winMenuHdl, 0xFFFFFFFF, flags, itemID, lpNewItem); + (*tkWinProcs->insertMenu)(winMenuHdl, 0xFFFFFFFF, flags, + itemID, lpNewItem); } Tcl_DStringFree(&translatedText); if (itemText != NULL) { diff --git a/win/tkWinX.c b/win/tkWinX.c index 28b83fe..bd8e75c 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinX.c,v 1.29 2004/05/03 22:28:45 hobbs Exp $ + * RCS: @(#) $Id: tkWinX.c,v 1.30 2004/05/03 22:40:30 hobbs Exp $ */ #include "tkWinInt.h" @@ -58,6 +58,8 @@ static TkWinProcs asciiProcs = { LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)) CreateWindowExA, + (BOOL (WINAPI *)(HMENU hMenu, UINT uPosition, UINT uFlags, + UINT uIDNewItem, LPCTSTR lpNewItem)) InsertMenuA, }; static TkWinProcs unicodeProcs = { @@ -73,6 +75,8 @@ static TkWinProcs unicodeProcs = { LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)) CreateWindowExW, + (BOOL (WINAPI *)(HMENU hMenu, UINT uPosition, UINT uFlags, + UINT uIDNewItem, LPCTSTR lpNewItem)) InsertMenuW, }; TkWinProcs *tkWinProcs; |