diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-28 18:45:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-28 18:45:54 +0000 |
commit | a70382b0e8bed265a1d314d9f6aae8f2dd48d20b (patch) | |
tree | 9a99a073c0d7b9483dab51a0eebf04a9119f61ed /plugins/Quotes/src/WinCtrlHelper.h | |
parent | 68fb5b69ea8403a3f9dcb70b3133eb10e1711000 (diff) |
ex-protos moved to the Plugins folder
git-svn-id: http://svn.miranda-ng.org/main/trunk@2545 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Quotes/src/WinCtrlHelper.h')
-rw-r--r-- | plugins/Quotes/src/WinCtrlHelper.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/plugins/Quotes/src/WinCtrlHelper.h b/plugins/Quotes/src/WinCtrlHelper.h new file mode 100644 index 0000000000..d7f8957a86 --- /dev/null +++ b/plugins/Quotes/src/WinCtrlHelper.h @@ -0,0 +1,37 @@ +#ifndef __a05d6852_4497_4f28_85e1_48a15a170738_WinCtrlHelper_h__
+#define __a05d6852_4497_4f28_85e1_48a15a170738_WinCtrlHelper_h__
+
+class IQuotesProvider;
+
+inline tstring get_window_text(HWND hWnd)
+{
+ int cBytes = ::GetWindowTextLength(hWnd);
+
+ std::vector<TCHAR> aBuf(cBytes+1);
+ LPTSTR pBuffer = &*(aBuf.begin());
+ ::GetWindowText(hWnd,pBuffer,cBytes+1);
+
+ return tstring(pBuffer);
+}
+
+inline void prepare_edit_ctrl_for_error(HWND hwndEdit)
+{
+ ::SetFocus(hwndEdit);
+ ::SendMessage(hwndEdit, EM_SETSEL, 0, -1);
+ ::SendMessage(hwndEdit, EM_SCROLLCARET, 0, 0);
+}
+
+void show_variable_list(HWND hwndParent,const IQuotesProvider* pProvider);
+
+inline int Quotes_MessageBox(HWND hWnd,LPCTSTR pszText,UINT nType = MB_OK)
+{
+ return ::MessageBox(hWnd,pszText,quotes_a2t(MIRANDANAME).c_str(),nType);
+}
+
+inline void spin_set_range(HWND hwndSpin,short nLower,short nUpper)
+{
+ ::SendMessage(hwndSpin,UDM_SETRANGE,0,MAKELPARAM(nUpper,nLower));
+}
+
+
+#endif //__a05d6852_4497_4f28_85e1_48a15a170738_WinCtrlHelper_h__
|