mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-03-01 11:29:27 +00:00
Added menu check to easily tell if write protection is on / off
This commit is contained in:
parent
954de50e9c
commit
eb36e472a5
@ -959,6 +959,15 @@ void ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive)
|
|||||||
// coordinates of the mouse click to screen coordinates.
|
// coordinates of the mouse click to screen coordinates.
|
||||||
ClientToScreen(hwnd, (LPPOINT) &pt);
|
ClientToScreen(hwnd, (LPPOINT) &pt);
|
||||||
|
|
||||||
|
int iMenuItem = ID_DISKMENU_WRITEPROTECTION_OFF;
|
||||||
|
if (DiskGetProtect( iDrive ))
|
||||||
|
iMenuItem = ID_DISKMENU_WRITEPROTECTION_ON;
|
||||||
|
|
||||||
|
CheckMenuItem( hmenu,
|
||||||
|
iMenuItem,
|
||||||
|
MF_CHECKED // MF_BYPOSITION
|
||||||
|
);
|
||||||
|
|
||||||
// Draw and track the shortcut menu.
|
// Draw and track the shortcut menu.
|
||||||
int iCommand = TrackPopupMenu(
|
int iCommand = TrackPopupMenu(
|
||||||
hmenuTrackPopup
|
hmenuTrackPopup
|
||||||
@ -971,10 +980,10 @@ void ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive)
|
|||||||
DiskEject( iDrive );
|
DiskEject( iDrive );
|
||||||
else
|
else
|
||||||
if (iCommand == ID_DISKMENU_WRITEPROTECTION_ON)
|
if (iCommand == ID_DISKMENU_WRITEPROTECTION_ON)
|
||||||
DiskProtect( iDrive, true );
|
DiskSetProtect( iDrive, true );
|
||||||
else
|
else
|
||||||
if (iCommand == ID_DISKMENU_WRITEPROTECTION_OFF)
|
if (iCommand == ID_DISKMENU_WRITEPROTECTION_OFF)
|
||||||
DiskProtect( iDrive, false );
|
DiskSetProtect( iDrive, false );
|
||||||
|
|
||||||
// Destroy the menu.
|
// Destroy the menu.
|
||||||
DestroyMenu(hmenu);
|
DestroyMenu(hmenu);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user