summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-26 12:32:54 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-26 12:32:54 +0300
commit1d8b5028056bbfe0dd3616162da30378f043c0c0 (patch)
tree55c4fa4a81fbe09167f900fd2d53aa428ce0f771 /src/mir_app
parent44e0a42d6130fbc42d826a7673d99480a06a87f6 (diff)
EnterString: ability to enter simple strings (not multiline)
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/res/resource.rc1
-rw-r--r--src/mir_app/src/enterstring.cpp4
-rw-r--r--src/mir_app/src/resource.h1
3 files changed, 6 insertions, 0 deletions
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