Skip to content

Instantly share code, notes, and snippets.

@zrax
Created January 11, 2013 05:49
Show Gist options
  • Save zrax/4508265 to your computer and use it in GitHub Desktop.
Save zrax/4508265 to your computer and use it in GitHub Desktop.
dirty hack
static std::set<plStringBuffer<wchar_t>> bufs;
plStringBuffer<wchar_t> buf = text.ToWchar();
bufs.insert(buf);
TVITEM tvi = {0};
tvi.mask = TVIF_TEXT | TVIF_PARAM;
tvi.pszText = const_cast<LPWSTR>(buf.GetData());
tvi.cchTextMax = static_cast<int>(text.GetSize());
tvi.lParam = NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment