diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-15 21:35:02 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-15 21:35:02 +0000 |
commit | c2025a23b1921c2112298d71c42e1aa741e029f6 (patch) | |
tree | 78a30eaa53e524e61ef83d25c600cdd00a2ce962 /plugins | |
parent | 7dff82fea29945f8625ecf3df9f2428dd1ab38d0 (diff) |
fix for dropping files into Scriver
git-svn-id: http://svn.miranda-ng.org/main/trunk@4968 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 8 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.cpp | 10 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.h | 5 |
3 files changed, 19 insertions, 4 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index cf769776f9..06124f4f3a 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -36,7 +36,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern HCURSOR hCurSplitNS, hCurSplitWE, hCurHyperlinkHand, hDragCursor;
extern HANDLE hHookWinEvt;
extern HANDLE hHookWinPopup;
-extern CREOleCallback reOleCallback, reOleCallback2;
+extern CREOleCallback reOleCallback;
+extern CREOleCallback2 reOleCallback2;
static void UpdateReadChars(HWND hwndDlg, struct SrmmWindowData * dat);
@@ -418,6 +419,7 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar case EM_SUBCLASSED:
dat = (struct MsgEditSubclassData *) mir_alloc(sizeof(struct MsgEditSubclassData));
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) dat);
+ DragAcceptFiles(hwnd, TRUE);
dat->lastEnterTime = 0;
return 0;
@@ -494,6 +496,7 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar }
static void SubclassMessageEdit(HWND hwnd) {
+ RichUtil_SubClass(hwnd);
mir_subclassWindow(hwnd, MessageEditSubclassProc);
SendMessage(hwnd, EM_SUBCLASSED, 0, 0);
}
@@ -503,6 +506,7 @@ static void UnsubclassMessageEdit(HWND hwnd) { }
static void SubclassLogEdit(HWND hwnd) {
+ RichUtil_SubClass(hwnd);
mir_subclassWindow(hwnd, LogEditSubclassProc);
SendMessage(hwnd, EM_SUBCLASSED, 0, 0);
}
@@ -858,8 +862,6 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP }
/* get around a lame bug in the Windows template resource code where richedits are limited to 0x7FFF */
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_LIMITTEXT, (WPARAM) sizeof(TCHAR) * 0x7FFFFFFF, 0);
- RichUtil_SubClass(GetDlgItem(hwndDlg, IDC_MESSAGE));
- RichUtil_SubClass(GetDlgItem(hwndDlg, IDC_LOG));
SubclassLogEdit(GetDlgItem(hwndDlg, IDC_LOG));
SubclassMessageEdit(GetDlgItem(hwndDlg, IDC_MESSAGE));
dat->infobarData = CreateInfobar(hwndDlg, dat);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 3e775f2ac6..7acb87ab82 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -572,7 +572,8 @@ int OnLoadModule(void) ///////////////////////////////////////////////////////////////////////////////////////////////////////
-CREOleCallback reOleCallback, reOleCallback2;
+CREOleCallback reOleCallback;
+CREOleCallback2 reOleCallback2;
STDMETHODIMP CREOleCallback::QueryInterface(REFIID riid, LPVOID * ppvObj)
{
@@ -659,3 +660,10 @@ STDMETHODIMP CREOleCallback::ShowContainerUI(BOOL fShow) {
return S_OK;
}
+
+STDMETHODIMP CREOleCallback2::QueryAcceptData(LPDATAOBJECT lpdataobj, CLIPFORMAT * lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict)
+{
+ *lpcfFormat = CF_TEXT;
+ return S_OK;
+}
+
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 72d521b69e..f39b3eb115 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -221,6 +221,11 @@ struct CREOleCallback : public IRichEditOleCallback STDMETHOD(GetContextMenu) (WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE FAR * lpchrg, HMENU FAR * lphmenu) ;
};
+struct CREOleCallback2 : public CREOleCallback
+{
+ STDMETHOD(QueryAcceptData) (LPDATAOBJECT lpdataobj, CLIPFORMAT FAR * lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict);
+};
+
INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|