diff options
author | George Hazan <george.hazan@gmail.com> | 2014-06-11 17:50:10 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-06-11 17:50:10 +0000 |
commit | 393c8dd0345138e00b6a5a1e13b06f60c83e02e8 (patch) | |
tree | efe30c65cd729d81af51bd2bacdd093a32d38d81 /plugins/Popup/src/opttree.cpp | |
parent | 075c7d0030e543e59adceae9e73c73cbb661482f (diff) |
ansi popups dead
git-svn-id: http://svn.miranda-ng.org/main/trunk@9433 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src/opttree.cpp')
-rw-r--r-- | plugins/Popup/src/opttree.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
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)
|