mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-02 15:49:52 -04:00
[ui] display device description as tooltip
This commit is contained in:
parent
f263369e55
commit
22fa3fc131
3 changed files with 10 additions and 3 deletions
7
rufus.c
7
rufus.c
|
@ -57,7 +57,7 @@ char szFolderPath[MAX_PATH];
|
|||
HWND hStatus;
|
||||
float fScale = 1.0f;
|
||||
|
||||
static HWND hDeviceList, hCapacity, hFileSystem;
|
||||
static HWND hDeviceList, hCapacity, hFileSystem, hDeviceToolTip = NULL;
|
||||
static StrArray DriveID;
|
||||
|
||||
#ifdef RUFUS_DEBUG
|
||||
|
@ -509,6 +509,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
|||
case IDCANCEL:
|
||||
PostQuitMessage(0);
|
||||
StrArrayDestroy(&DriveID);
|
||||
DestroyAllTooltips();
|
||||
EndDialog(hDlg, 0);
|
||||
break;
|
||||
case IDC_ABOUT:
|
||||
|
@ -520,7 +521,9 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
|||
nDeviceIndex = ComboBox_GetCurSel(hDeviceList);
|
||||
if (nDeviceIndex != CB_ERR) {
|
||||
PopulateProperties(ComboBox_GetCurSel(hDeviceList));
|
||||
SetDlgItemTextU(hMainDialog, IDC_STATUS, DriveID.Table[nDeviceIndex]);
|
||||
// Display a tooltip with the OS reported description
|
||||
DestroyTooltip(hDeviceToolTip);
|
||||
hDeviceToolTip = CreateTooltip(hDeviceList, DriveID.Table[nDeviceIndex], -1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue