void win_set_title(char *title) { wchar wtitle[strlen(title) + 1]; if (cs_mbstowcs(wtitle, title, lengthof(wtitle)) >= 0) SetWindowTextW(wnd, wtitle); }
void win_prefix_title(const char * prefix) { int len = GetWindowTextLengthW(wnd); wchar ptitle[strlen(prefix) + len + 1]; int plen = cs_mbstowcs(ptitle, prefix, lengthof(ptitle)); wchar * title = & ptitle[plen]; len = GetWindowTextW(wnd, title, len + 1); SetWindowTextW(wnd, ptitle); }