Hugh McMaster : regedit: Always display DWORD values in hexadecimal when initializing the editor dialog.

Alexandre Julliard julliard at winehq.org
Mon Jul 16 14:40:00 CDT 2018


Module: wine
Branch: master
Commit: 32f487bdb2483f96864411f948d35c8f0eaa8bdf
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=32f487bdb2483f96864411f948d35c8f0eaa8bdf

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Mon Jul 16 12:20:48 2018 +0000

regedit: Always display DWORD values in hexadecimal when initializing the editor dialog.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/regedit/edit.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c
index 00dcbec..63cb869 100644
--- a/programs/regedit/edit.c
+++ b/programs/regedit/edit.c
@@ -106,7 +106,8 @@ static INT_PTR CALLBACK modify_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
     case WM_INITDIALOG:
         SetDlgItemTextW(hwndDlg, IDC_VALUE_NAME, editValueName);
         SetDlgItemTextW(hwndDlg, IDC_VALUE_DATA, stringValueData);
-	CheckRadioButton(hwndDlg, IDC_DWORD_HEX, IDC_DWORD_DEC, isDecimal ? IDC_DWORD_DEC : IDC_DWORD_HEX);
+        CheckRadioButton(hwndDlg, IDC_DWORD_HEX, IDC_DWORD_DEC, IDC_DWORD_HEX);
+        isDecimal = FALSE;
         return TRUE;
     case WM_COMMAND:
         switch (LOWORD(wParam)) {
@@ -280,9 +281,8 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName)
             else error_code_messagebox(hwnd, IDS_SET_VALUE_FAILED);
         }
     } else if ( type == REG_DWORD ) {
-	const WCHAR u[] = {'%','u',0};
-	const WCHAR x[] = {'%','x',0};
-	wsprintfW(stringValueData, isDecimal ? u : x, *((DWORD*)stringValueData));
+        static const WCHAR x[] = {'%','x',0};
+        wsprintfW(stringValueData, x, *((DWORD*)stringValueData));
 	if (DialogBoxW(0, MAKEINTRESOURCEW(IDD_EDIT_DWORD), hwnd, modify_dlgproc) == IDOK) {
 	    DWORD val;
 	    CHAR* valueA = GetMultiByteString(stringValueData);




More information about the wine-cvs mailing list