diff options
author | George Hazan <ghazan@miranda.im> | 2017-04-07 14:36:22 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-04-07 14:36:22 +0300 |
commit | c46f4344f007d814131d25fa5aec6fdb4c7a049d (patch) | |
tree | 2728e27c52e2e12bcadcf2f5606196229607c7af /plugins/TabSRMM/src | |
parent | 77f05f77b497b1d69e8107caefd6d19fa9c609ab (diff) |
Windows-specific code moved to mir_core
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/chat_window.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 95 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 28 | ||||
-rw-r--r-- | plugins/TabSRMM/src/stdafx.h | 4 |
5 files changed, 2 insertions, 131 deletions
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index 4d45b95a44..e31874b986 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -524,11 +524,10 @@ void CChatRoomDlg::OnInitDialog() m_pPanel.getVisibility(); m_pPanel.Configure(); - m_log.SendMsg(EM_SETOLECALLBACK, 0, (LPARAM)&reOleCallback); - m_log.SendMsg(EM_AUTOURLDETECT, 1, 0); SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_PANELSPLITTER), GWLP_WNDPROC, (LONG_PTR)SplitterSubclassProc); NotifyEvent(MSG_WINDOW_EVT_OPENING); + m_log.SendMsg(EM_AUTOURLDETECT, 1, 0); m_log.SendMsg(EM_SETEVENTMASK, 0, m_log.SendMsg(EM_GETEVENTMASK, 0, 0) | ENM_LINK | ENM_MOUSEEVENTS | ENM_KEYEVENTS); m_log.SendMsg(EM_LIMITTEXT, 0x7FFFFFFF, 0); m_log.SendMsg(EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(3, 3)); diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 512d30b786..37c09e2782 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -750,10 +750,9 @@ void CSrmmWindow::OnInitDialog() m_log.SendMsg(EM_SETUNDOLIMIT, 0, 0);
m_log.SendMsg(EM_SETEVENTMASK, 0, ENM_MOUSEEVENTS | ENM_KEYEVENTS | ENM_LINK);
- m_log.SendMsg(EM_SETOLECALLBACK, 0, (LPARAM)&reOleCallback);
m_message.SendMsg(EM_SETEVENTMASK, 0, ENM_REQUESTRESIZE | ENM_MOUSEEVENTS | ENM_SCROLL | ENM_KEYEVENTS | ENM_CHANGE);
- m_message.SendMsg(EM_SETOLECALLBACK, 0, (LPARAM)&reOleCallback2);
+ m_message.SetReadOnly(false);
m_bActualHistory = M.GetByte(m_hContact, "ActualHistory", 0) != 0;
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 8efe5d6fe2..ea324dd809 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -1056,98 +1056,3 @@ int LoadSendRecvMessageModule(void) LoadDefaultTemplates();
return 0;
}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////
-
-CREOleCallback reOleCallback;
-CREOleCallback2 reOleCallback2;
-
-STDMETHODIMP CREOleCallback::QueryInterface(REFIID riid, LPVOID * ppvObj)
-{
- if (IsEqualIID(riid, IID_IRichEditOleCallback)) {
- *ppvObj = this;
- AddRef();
- return S_OK;
- }
- *ppvObj = nullptr;
- return E_NOINTERFACE;
-}
-
-STDMETHODIMP_(ULONG) CREOleCallback::AddRef()
-{
- if (refCount == 0)
- StgCreateDocfile(nullptr, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_DELETEONRELEASE, 0, &pictStg);
-
- return ++refCount;
-}
-
-STDMETHODIMP_(ULONG) CREOleCallback::Release()
-{
- if (--refCount == 0) {
- if (pictStg) {
- pictStg->Release();
- pictStg = nullptr;
- }
- }
- return refCount;
-}
-
-STDMETHODIMP CREOleCallback::ContextSensitiveHelp(BOOL)
-{
- return S_OK;
-}
-
-STDMETHODIMP CREOleCallback::DeleteObject(LPOLEOBJECT)
-{
- return S_OK;
-}
-
-STDMETHODIMP CREOleCallback::GetClipboardData(CHARRANGE*, DWORD, LPDATAOBJECT*)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CREOleCallback::GetContextMenu(WORD, LPOLEOBJECT, CHARRANGE*, HMENU*)
-{
- return E_INVALIDARG;
-}
-
-STDMETHODIMP CREOleCallback::GetDragDropEffect(BOOL, DWORD, LPDWORD)
-{
- return S_OK;
-}
-
-STDMETHODIMP CREOleCallback::GetInPlaceContext(LPOLEINPLACEFRAME*, LPOLEINPLACEUIWINDOW*, LPOLEINPLACEFRAMEINFO)
-{
- return E_INVALIDARG;
-}
-
-STDMETHODIMP CREOleCallback::GetNewStorage(LPSTORAGE *lplpstg)
-{
- wchar_t sztName[64];
- mir_snwprintf(sztName, L"s%u", nextStgId++);
- if (pictStg == nullptr)
- return STG_E_MEDIUMFULL;
- return pictStg->CreateStorage(sztName, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, 0, lplpstg);
-}
-
-STDMETHODIMP CREOleCallback::QueryAcceptData(LPDATAOBJECT, CLIPFORMAT*, DWORD, BOOL, HGLOBAL)
-{
- return S_OK;
-}
-
-STDMETHODIMP CREOleCallback::QueryInsertObject(LPCLSID, LPSTORAGE, LONG)
-{
- return S_OK;
-}
-
-STDMETHODIMP CREOleCallback::ShowContainerUI(BOOL)
-{
- return S_OK;
-}
-
-STDMETHODIMP CREOleCallback2::QueryAcceptData(LPDATAOBJECT, CLIPFORMAT *lpcfFormat, DWORD, BOOL, HGLOBAL)
-{
- *lpcfFormat = CF_UNICODETEXT;
- return S_OK;
-}
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index a735db1f04..b1e261bd79 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -764,34 +764,6 @@ struct TIconDescW // can be added to the richedit control.
// this class has to implement the GetNewStorage() method
-struct CREOleCallback : public IRichEditOleCallback
-{
- CREOleCallback() : refCount(0), nextStgId(0), pictStg(nullptr) {}
- unsigned refCount;
- IStorage *pictStg;
- int nextStgId;
-
- STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR *lplpObj);
- STDMETHOD_(ULONG, AddRef)(THIS);
- STDMETHOD_(ULONG, Release)(THIS);
-
- STDMETHOD(ContextSensitiveHelp) (BOOL fEnterMode);
- STDMETHOD(GetNewStorage) (LPSTORAGE FAR *lplpstg);
- STDMETHOD(GetInPlaceContext) (LPOLEINPLACEFRAME FAR *lplpFrame, LPOLEINPLACEUIWINDOW FAR *lplpDoc, LPOLEINPLACEFRAMEINFO lpFrameInfo);
- STDMETHOD(ShowContainerUI) (BOOL fShow);
- STDMETHOD(QueryInsertObject) (LPCLSID lpclsid, LPSTORAGE lpstg, LONG cp);
- STDMETHOD(DeleteObject) (LPOLEOBJECT lpoleobj);
- STDMETHOD(QueryAcceptData) (LPDATAOBJECT lpdataobj, CLIPFORMAT FAR *lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict);
- STDMETHOD(GetClipboardData) (CHARRANGE FAR *lpchrg, DWORD reco, LPDATAOBJECT FAR *lplpdataobj);
- STDMETHOD(GetDragDropEffect) (BOOL fDrag, DWORD grfKeyState, LPDWORD pdwEffect);
- 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);
-};
-
#define MSGFONTID_MYMSG 0
#define MSGFONTID_MYMISC 1
#define MSGFONTID_YOURMSG 2
diff --git a/plugins/TabSRMM/src/stdafx.h b/plugins/TabSRMM/src/stdafx.h index b8af3d7540..3cd811adca 100644 --- a/plugins/TabSRMM/src/stdafx.h +++ b/plugins/TabSRMM/src/stdafx.h @@ -239,12 +239,8 @@ extern bool g_bShutdown; extern pfnDoPopup oldDoPopup, oldLogToFile;
extern pfnDoTrayIcon oldDoTrayIcon;
-extern CREOleCallback reOleCallback;
-extern CREOleCallback2 reOleCallback2;
-
int LoadSendRecvMessageModule(void);
int SplitmsgShutdown(void);
-void LogErrorMessage(HWND hwndDlg, CSrmmWindow *dat, int i, wchar_t *szMsg);
int Chat_Load(), Chat_Unload();
void FreeLogFonts();
|