From: Eric Kohl Date: Mon, 8 Oct 2018 16:55:39 +0000 (+0200) Subject: [NETCFGX] NetPropPageProvider: Add Base and Step parameter options. X-Git-Tag: 0.4.12-dev~575 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=11c9e773fb164c437b5908c31762536c3e791916 [NETCFGX] NetPropPageProvider: Add Base and Step parameter options. --- diff --git a/dll/win32/netcfgx/propertypage.c b/dll/win32/netcfgx/propertypage.c index 37a731e2ce2..1c37083c9f2 100644 --- a/dll/win32/netcfgx/propertypage.c +++ b/dll/win32/netcfgx/propertypage.c @@ -40,6 +40,9 @@ typedef struct _PARAMETER BOOL bUpperCase; INT iTextLimit; + + INT iBase; + INT iStep; } PARAMETER, *PPARAMETER; typedef struct _PARAMETER_ARRAY @@ -490,7 +493,17 @@ BuildParameterArray( ParamArray->Array[dwIndex].Type == WORD_TYPE || ParamArray->Array[dwIndex].Type == DWORD_TYPE) { - /* FIXME: Read Base, Min, Max and Step values */ + /* FIXME: Read Min and Max values */ + + GetIntValue(hParamKey, + L"Base", + 10, + &ParamArray->Array[dwIndex].iBase); + + GetIntValue(hParamKey, + L"Step", + 1, + &ParamArray->Array[dwIndex].iStep); } else if (ParamArray->Array[dwIndex].Type == EDIT_TYPE) { @@ -682,6 +695,11 @@ DisplayParameter( EnableWindow(hwndControl, Parameter->bPresent); ShowWindow(hwndControl, SW_SHOW); + if (Parameter->Type == WORD_TYPE || Parameter->Type == DWORD_TYPE) + SendMessage(hwndControl, UDM_SETBASE, Parameter->iBase, 0); + else + SendMessage(hwndControl, UDM_SETBASE, 10, 0); + hwndControl = GetDlgItem(hwnd, IDC_PROPERTY_VALUE_EDIT); EnableWindow(hwndControl, Parameter->bPresent); ShowWindow(hwndControl, SW_SHOW); @@ -881,6 +899,11 @@ OnNotify( TRACE("PSN_APPLY!\n"); WriteParameterArray(hwnd, pParamArray); } + else if (((LPNMHDR)lParam)->code == (UINT)UDN_DELTAPOS) + { + LPNMUPDOWN pUpDown = (LPNMUPDOWN)lParam; + pUpDown->iDelta *= pParamArray->pCurrentParam->iStep; + } }