From 1d8b5028056bbfe0dd3616162da30378f043c0c0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 26 Sep 2019 12:32:54 +0300 Subject: EnterString: ability to enter simple strings (not multiline) --- src/mir_app/res/resource.rc | 1 + src/mir_app/src/enterstring.cpp | 4 ++++ src/mir_app/src/resource.h | 1 + 3 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc index 3e5cd8d7fd..50c4de9fbf 100644 --- a/src/mir_app/res/resource.rc +++ b/src/mir_app/res/resource.rc @@ -610,6 +610,7 @@ STYLE DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_P EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN + EDITTEXT IDC_TXT_SIMPLE,6,6,230,12,ES_WANTRETURN | NOT WS_VISIBLE EDITTEXT IDC_TXT_MULTILINE,6,6,230,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | NOT WS_VISIBLE | WS_VSCROLL EDITTEXT IDC_TXT_PASSWORD,6,6,230,12,ES_PASSWORD | ES_AUTOHSCROLL | NOT WS_VISIBLE COMBOBOX IDC_TXT_COMBO,6,6,230,92,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP diff --git a/src/mir_app/src/enterstring.cpp b/src/mir_app/src/enterstring.cpp index fd3a9c9477..0785232139 100644 --- a/src/mir_app/src/enterstring.cpp +++ b/src/mir_app/src/enterstring.cpp @@ -128,6 +128,10 @@ static INT_PTR CALLBACK sttEnterStringDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa rc.bottom += (rc.bottom - rc.top) * 2; SetWindowPos(hwndDlg, nullptr, 0, 0, rc.right - rc.left, rc.bottom - rc.top, SWP_NOMOVE | SWP_NOREPOSITION); break; + + default: // single string edit field + params->idcControl = IDC_TXT_SIMPLE; + params->height = rc.bottom - rc.top; } } ShowWindow(GetDlgItem(hwndDlg, params->idcControl), SW_SHOW); diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h index 83c2227983..fbf6d7920e 100644 --- a/src/mir_app/src/resource.h +++ b/src/mir_app/src/resource.h @@ -215,6 +215,7 @@ #define IDC_TOOLBARTREE 1040 #define IDC_URL 1041 #define IDC_FONTGROUP 1042 +#define IDC_TXT_SIMPLE 1043 #define IDC_BTN_RESET 1045 #define IDC_REASON 1046 #define IDC_BTN_UNDO 1047 -- cgit v1.2.3