mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-02-12 18:31:44 +00:00
Disk Config dialog: small refactor
This commit is contained in:
parent
13aee80bd5
commit
d81cb0d533
@ -215,11 +215,13 @@ void CPageDisk::EnableDisk(HWND hWnd, BOOL bEnable)
|
||||
|
||||
void CPageDisk::HandleHDDCombo(HWND hWnd, UINT driveSelected, UINT comboSelected)
|
||||
{
|
||||
if (!IsDlgButtonChecked(hWnd, IDC_HDD_ENABLE))
|
||||
return;
|
||||
|
||||
// Search from "select hard drive"
|
||||
DWORD dwOpenDialogIndex = (DWORD)SendDlgItemMessage(hWnd, comboSelected, CB_FINDSTRINGEXACT, -1, (LPARAM)&m_defaultHDDOptions[0]);
|
||||
DWORD dwComboSelection = (DWORD)SendDlgItemMessage(hWnd, comboSelected, CB_GETCURSEL, 0, 0);
|
||||
if (IsDlgButtonChecked(hWnd, IDC_HDD_ENABLE))
|
||||
{
|
||||
|
||||
SendDlgItemMessage(hWnd, comboSelected, CB_SETCURSEL, -1, 0); // Set to "empty" item
|
||||
|
||||
if (dwComboSelection == dwOpenDialogIndex)
|
||||
@ -230,7 +232,7 @@ void CPageDisk::HandleHDDCombo(HWND hWnd, UINT driveSelected, UINT comboSelected
|
||||
|
||||
if (!bRes)
|
||||
{
|
||||
if (SendDlgItemMessage(hWnd, comboSelected, CB_GETCOUNT, 0, 0) == 3) // If there's already a disk...
|
||||
if (SendDlgItemMessage(hWnd, comboSelected, CB_GETCOUNT, 0, 0) == 3) // If there's already a HDD...
|
||||
SendDlgItemMessage(hWnd, comboSelected, CB_SETCURSEL, 0, 0); // then reselect it in the ComboBox
|
||||
return;
|
||||
}
|
||||
@ -274,7 +276,6 @@ void CPageDisk::HandleHDDCombo(HWND hWnd, UINT driveSelected, UINT comboSelected
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CPageDisk::HandleDiskCombo(HWND hWnd, UINT driveSelected, UINT comboSelected)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user