Minor UI tweaks

This commit is contained in:
Henrik Rydgård committed 2026-02-11 23:33:39 +01:00
1 parent 60f0f79273
commit e1b638aaab
5 files changed
+9 -7

No files matched your search

+2 -1
View File
@@ -135,7 +135,8 @@ namespace MainWindow {
MENUITEMINFO menuInfo{ sizeof(menuInfo), MIIM_STRING };
std::string retVal;
if (GetMenuItemInfo(menu, menuID, MF_BYCOMMAND, &menuInfo) != FALSE) {
std::vector<wchar_t> buffer(menuInfo.cch + 1);
menuInfo.cch++; // account for null terminator
std::vector<wchar_t> buffer(menuInfo.cch);
menuInfo.dwTypeData = buffer.data();
GetMenuItemInfo(menu, menuID, MF_BYCOMMAND, &menuInfo);
retVal = ConvertWStringToUTF8(menuInfo.dwTypeData); // note, this is buffer.