Hi Sasinex,
The m_msgWnd that you are using is not a valid OEAPI object (it is not
related to any open message window), you should get a IOEMsgWnd like this:
m_msgWnd = m_oeapi->GetMsgWnd(msgWndId);
Where msgWndId is a message window id.
There's another way to do this without a IOEMsgWnd: You can use the
event OnToolbarButtonMsgWndClicked from IOEAPIObj.
Thank you for contacting Nektra's OEAPI Support.
Regards,
Federico
sasinex wrote:
> I've got problem with sink of events from message window :/
> This is header .h:
> class ATL_NO_VTABLE Catl_addin :
> ....
> public IDispEventSimpleImpl<4, Catl_addin,
> &__uuidof(OEAPI::IOEMsgWndEvents)>
> {
> public:
> ....
> typedef IDispEventSimpleImpl<4, Catl_addin,
> &__uuidof(OEAPI::IOEMsgWndEvents)> _OEMsgWndEvents;
> ...
> BEGIN_SINK_MAP(Catl_addin)
> ....
> SINK_ENTRY_INFO(4, __uuidof(OEAPI::IOEMsgWndEvents), 0x0001,
> OnToolbarButtonClickedMsgWnd, &TwoLongParamInfo)
> ....
> END_SINK_MAP()
> ....
> CComPtr<IOEMsgWnd> m_msgWnd;
> }
> and here .cpp
> if(SUCCEEDED(m_msgWnd.CoCreateInstance(CLSID_OEMsgWnd)))
> {
> HRESULT hr = _OEMsgWndEvents::DispEventAdvise((IUnknown*)m_msgWnd,
> &__uuidof(OEAPI::IOEMsgWndEvents);
> }
> but this do not start sink events listening :(
--
Nektra Advanced Computing
http://www.nektra.com