mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[0.4.15][CALC][SECLOGON][REGEDIT] Various small bugfixes
Fixes CORE-19745, CORE-19793, CORE-19743 This is a squashed backport of the following commits:30b4024
[CALC] Fix copy command when output is NaN (#7496)0e462a3
[SECLOGON] Add missing service status updates17eff53
[REGEDIT] Add ES_AUTOHSCROLL to address bar window (#7638) Co-Authored-By: Carlo Bramini <30959007+carlo-bramini@users.noreply.github.com> Co-Authored-By: Eric Kohl <32571919+EricKohl@users.noreply.github.com> Co-Authored-By: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
This commit is contained in:
parent
dccf79895c
commit
8ba2cd78ae
3 changed files with 12 additions and 3 deletions
|
@ -1015,10 +1015,16 @@ static void handle_copy_command(HWND hWnd)
|
||||||
TCHAR display[MAX_CALC_SIZE];
|
TCHAR display[MAX_CALC_SIZE];
|
||||||
UINT n;
|
UINT n;
|
||||||
|
|
||||||
|
// Read current text from output display
|
||||||
n = GetDlgItemText(hWnd, IDC_TEXT_OUTPUT, display, SIZEOF(display));
|
n = GetDlgItemText(hWnd, IDC_TEXT_OUTPUT, display, SIZEOF(display));
|
||||||
|
|
||||||
if (calc.base == IDC_RADIO_DEC && _tcschr(calc.buffer, _T('.')) == NULL)
|
// Check if result is a true number
|
||||||
display[n - calc.sDecimal_len] = _T('\0');
|
if (!calc.is_nan)
|
||||||
|
{
|
||||||
|
// Remove trailing decimal point if no decimal digits exist
|
||||||
|
if (calc.base == IDC_RADIO_DEC && _tcschr(calc.buffer, _T('.')) == NULL)
|
||||||
|
display[n - calc.sDecimal_len] = _T('\0');
|
||||||
|
}
|
||||||
|
|
||||||
CopyMemToClipboard(display);
|
CopyMemToClipboard(display);
|
||||||
}
|
}
|
||||||
|
|
|
@ -388,7 +388,8 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
g_pChildWnd->nSplitPos = 190;
|
g_pChildWnd->nSplitPos = 190;
|
||||||
g_pChildWnd->hWnd = hWnd;
|
g_pChildWnd->hWnd = hWnd;
|
||||||
|
|
||||||
style = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
|
/* ES_AUTOHSCROLL style enables horizontal scrolling and shrinking */
|
||||||
|
style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL;
|
||||||
g_pChildWnd->hAddressBarWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Edit", NULL, style,
|
g_pChildWnd->hAddressBarWnd = CreateWindowExW(WS_EX_CLIENTEDGE, L"Edit", NULL, style,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
hWnd, (HMENU)0, hInst, 0);
|
hWnd, (HMENU)0, hInst, 0);
|
||||||
|
|
|
@ -74,6 +74,7 @@ ServiceControlHandlerEx(
|
||||||
TRACE(" SERVICE_CONTROL_STOP received\n");
|
TRACE(" SERVICE_CONTROL_STOP received\n");
|
||||||
UpdateServiceStatus(SERVICE_STOP_PENDING);
|
UpdateServiceStatus(SERVICE_STOP_PENDING);
|
||||||
StopRpcServer();
|
StopRpcServer();
|
||||||
|
UpdateServiceStatus(SERVICE_STOPPED);
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
|
||||||
case SERVICE_CONTROL_PAUSE:
|
case SERVICE_CONTROL_PAUSE:
|
||||||
|
@ -100,6 +101,7 @@ ServiceControlHandlerEx(
|
||||||
TRACE(" SERVICE_CONTROL_SHUTDOWN received\n");
|
TRACE(" SERVICE_CONTROL_SHUTDOWN received\n");
|
||||||
UpdateServiceStatus(SERVICE_STOP_PENDING);
|
UpdateServiceStatus(SERVICE_STOP_PENDING);
|
||||||
StopRpcServer();
|
StopRpcServer();
|
||||||
|
UpdateServiceStatus(SERVICE_STOPPED);
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
|
|
Loading…
Reference in a new issue