From e390111dfb474657e99743bcf249bc4483e84752 Mon Sep 17 00:00:00 2001 From: Michael Niksa Date: Thu, 28 May 2020 14:16:10 -0700 Subject: [PATCH] Give cursor radio buttons their own sequential IDs in propsheet (#6231) For a radio button group to work properly, they need sequential IDs. This moves the cursor radio buttons on the `conhost` property sheet to be sequential. ## References - Introduced with #2663 - Found while investigating #4186 ## PR Checklist * [x] Closes unfiled issue found while investigating #4186 * [x] I work here. * [x] Manual test. * [x] No documentation required. * [x] Am core contributor. ## Detailed Description of the Pull Request / Additional comments - `CheckRadioButton` takes a contiguous group of IDs. It will set one item in the list and then uncheck the rest. When a new one was added to the group, it was added to the end of the segment in the IDs file, but not immediately after the existing radio buttons. This means it accidentally turned off all the other buttons in the middle. - To resolve this, I moved all the cursor buttons into their own sequential group number and I deprecated the old values. ## Validation Steps Performed - [x] Ensured that the "Discard Old Duplicates" value was set in the registry, walked through debugger as `conhost` packed the `TRUE` value into the property sheet blob, walked through the property sheet `console.dll` as it unpacked the `TRUE`, then observed that the checkbox was actually set instead of getting unset by the `CheckRadioButton` call that went from 107 to 119 and accidentally unchecked number 112, `IDD_HISTORY_NODUP` even though I swear it was just set. --- src/propsheet/dialogs.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/propsheet/dialogs.h b/src/propsheet/dialogs.h index 952e2ff9a08..60949a070ad 100644 --- a/src/propsheet/dialogs.h +++ b/src/propsheet/dialogs.h @@ -28,9 +28,9 @@ Revision History: // unused 102 #define IDD_QUICKEDIT 103 #define IDD_INSERT 104 -#define IDD_CURSOR_SMALL 105 -#define IDD_CURSOR_MEDIUM 106 -#define IDD_CURSOR_LARGE 107 +// unused 105, moved to 150 +// unused 106, moved to 151 +// unused 107, moved to 152 #define IDD_HISTORY_SIZE 108 #define IDD_HISTORY_SIZESCROLL 109 #define IDD_HISTORY_NUM 110 @@ -43,7 +43,12 @@ Revision History: #define IDD_LANGUAGE_GROUPBOX 116 #define DID_SETTINGS_COMCTL5 117 #define DID_SETTINGS2_COMCTL5 118 -#define IDD_CURSOR_ADVANCED 119 +// unused 119, moved to 153 + +#define IDD_CURSOR_SMALL 150 +#define IDD_CURSOR_MEDIUM 151 +#define IDD_CURSOR_LARGE 152 +#define IDD_CURSOR_ADVANCED 153 #define DID_FONTDLG 200 #define IDD_STATIC 201