Skip to content

Commit

Permalink
Fix for issue microsoft#1532
Browse files Browse the repository at this point in the history
[PowerToys] Show version on tooltip
  • Loading branch information
sqrlmn committed Apr 14, 2020
1 parent d584dc5 commit fc37129
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/runner/tray_icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ void start_tray_icon()
tray_icon_data.hWnd = hwnd;
tray_icon_data.uID = id_tray_icon;
tray_icon_data.uCallbackMessage = wm_icon_notify;
wcscpy_s(tray_icon_data.szTip, sizeof(tray_icon_data.szTip) / sizeof(WCHAR), L"PowerToys");
std::wstring about_msg_pt_version = L"PowerToys\n" + get_product_version(); // get the version: PowerToys\nVersion
wcscpy_s(tray_icon_data.szTip, sizeof(tray_icon_data.szTip) / sizeof(WCHAR), _wcsdup(about_msg_pt_version.c_str())); // convert type std::wstring to wchar_t* and show

tray_icon_data.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;

tray_icon_created = Shell_NotifyIcon(NIM_ADD, &tray_icon_data) == TRUE;
Expand Down

0 comments on commit fc37129

Please sign in to comment.