From 393c8dd0345138e00b6a5a1e13b06f60c83e02e8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 Jun 2014 17:50:10 +0000 Subject: ansi popups dead git-svn-id: http://svn.miranda-ng.org/main/trunk@9433 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Popup/src/opttree.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'plugins/Popup/src/opttree.cpp') diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp index 4f6e45ff22..52ead4fe51 100644 --- a/plugins/Popup/src/opttree.cpp +++ b/plugins/Popup/src/opttree.cpp @@ -27,22 +27,17 @@ enum { IMG_GROUP, IMG_CHECK, IMG_NOCHECK, IMG_RCHECK, IMG_NORCHECK, IMG_GRPOPEN, static void OptTree_TranslateItem(HWND hwndTree, HTREEITEM hItem) { - union - { - char ansi[128]; - WCHAR unicode[64]; - } buf; - + TCHAR buf[64]; - TVITEMW tvi = {0}; + TVITEM tvi = {0}; tvi.mask = TVIF_HANDLE | TVIF_TEXT; tvi.hItem = hItem; - tvi.pszText = buf.unicode; - tvi.cchTextMax = SIZEOF(buf.unicode); - SendMessageW(hwndTree, TVM_GETITEMW, 0, (LPARAM)&tvi); - tvi.pszText = TranslateW(tvi.pszText); - tvi.cchTextMax = lstrlenW(tvi.pszText); - SendMessageW(hwndTree, TVM_SETITEMW, 0, (LPARAM)&tvi); + tvi.pszText = buf; + tvi.cchTextMax = SIZEOF(buf); + SendMessage(hwndTree, TVM_GETITEMW, 0, (LPARAM)&tvi); + tvi.pszText = TranslateTS(tvi.pszText); + tvi.cchTextMax = lstrlen(tvi.pszText); + SendMessage(hwndTree, TVM_SETITEMW, 0, (LPARAM)&tvi); } void OptTree_Translate(HWND hwndTree) -- cgit v1.2.3