From c559a18ca21a2a1fa3199c4bb60bcd031ec17134 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 11 Jan 2014 16:23:36 +0000 Subject: MS_UTILS_ENTERSTRING moved from Jabber to the core, cause it's very handy git-svn-id: http://svn.miranda-ng.org/main/trunk@7593 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_utils.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'include') diff --git a/include/m_utils.h b/include/m_utils.h index a400842fa3..7b25987b6a 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -461,4 +461,36 @@ __forceinline TCHAR* Utils_ReplaceVarsT(const TCHAR *szData) { #define MS_UTILS_GETBITMAPFILTERSTRINGST MS_UTILS_GETBITMAPFILTERSTRINGS #endif +///////////////////////////////////////////////////////////////////////////////////////// +// one field form + +#define ESF_MULTILINE 1 +#define ESF_COMBO 2 +#define ESF_RICHEDIT 3 +#define ESF_PASSWORD 4 + +typedef struct +{ + int cbSize; // structure size + int type; // one of ESF_* constants + LPCSTR szModuleName; // module name to save window size and combobox strings + LPCSTR szDataPrefix; // prefix for stored database variables + LPCTSTR caption; // window caption + LPTSTR *result; // initial value + result entered + int recentCount; // number of combobox strings to store + int timeout; // timeout for the form auto-close +} +ENTER_STRING; + +// enters one string +// wParam = 0 (unused) +// lParam = ENTER_STRING* (form description) +// returns TRUE on pressing OK if Cancel was pressed +#define MS_UTILS_ENTERSTRING "Utils/EnterString" + +__forceinline BOOL EnterString(ENTER_STRING *pForm) +{ + return (BOOL)CallService(MS_UTILS_ENTERSTRING, 0, (LPARAM)pForm); +} + #endif // M_UTILS_H__ -- cgit v1.2.3