CComPtr<IOEMsgWnd> wnd = m_oeapi->GetMsgWnd(msgId);
BSTR b = SysAllocString(L"<A href=\"google.com\">google</A>");
wnd->SetBodyHTML(&b);
SysFreeString(b);
But in message there is only underlined "google", without link itself.
Using VB demo, ive inspected message, and found that its body contains
only this :
<A href="">google</A>
If i add some url to href and press "Set Body", nothing changes, in
fact, it is still without any url in href.
Same happens when i try to add <IMG> tags - i receive empty src, no
pictures displayed.
hey
I am Trying to write a pluggin where I am not able to succeed to call openmessage(msid,IMIME,**mime); Any pointers how to handle this on Vista . ? I am getting errors on Vista only.
Thanks
Somu
<A href="">google</A>
--
You received this message because you are subscribed to the Google Groups "Nektra OEAPI Support" group.
To post to this group, send email to Nektra...@googlegroups.com
To unsubscribe from this group, send email to Nektra-OEAPI...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Nektra-OEAPI?hl=en
..
Questions about the source code are handled directly through email, we
have already sent you an answer.
Thank you for contacting Nektra's OEAPI Support.
Regards,
Scott
--
Nektra Advanced Computing
http://www.nektra.com
BSTR b = SysAllocString(L"<A href=\"http://google.com\">google</A>");A note, just in case, if you want to set the body of the new message window only, you could make sure that the window style is "OE_MSG_SEND_WND".
Regards, Federico -- Nektra Advanced Computing http://www.nektra.com
My code:
BSTR b = SysAllocString(L"<A href=\"http://google.com\">second google</
A>");
Inspecting body:
<A href="">second google</A>
On Mar 19, 5:57 pm, Nektra OEAPI Support <oeapi-supp...@nektra.com>
wrote:
> Hi Yuriy,
> Try addinghttp://to your href, like this:BSTR b = SysAllocString(L"<A href=\"http://google.com\">google</A>");A note, just in case, if you want to set the body of the new message window only, you could make sure that thewindow styleis "OE_MSG_SEND_WND".Regards, Federico -- Nektra Advanced Computinghttp://www.nektra.com
Hou check, there is new messages not starting OE?
> --
> You received this message because you are subscribed to the Google Groups
> "Nektra OEAPI Support" group.
> To post to this group, send email to Nektra...@googlegroups.com
> To unsubscribe from this group, send email to
> Nektra-OEAPI...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/Nektra-OEAPI?hl=en
>
> --
> http://www.nektra.com
>
> To unsubscribe from this group, send email to
> nektra-oeapi+unsubscribegooglegroups.com or reply to this email with the
> words "REMOVE ME" as the subject.
>
OEAPI does not support checking if there are new messages without
starting OE.
That would require a direct connection to the mail server, and
authenticating to check if there are new messages.
Thank you for contacting Nektra's OEAPI Support.
Regards,
Federico
--
Nektra Advanced Computing
http://www.nektra.com
Thank you for contacting Nektra's OEAPI Support. Regards, Federico -- Nektra Advanced Computing http://www.nektra.com
Sorry, but your answer gives nothing useful to me, because you ignored
my problems,
and told me how to resolve problems i don't have. I don't want to
create new messages,
WM will do this for me, i want to modify message during compose. I
understand that i
should get the existing HTML body first, and then add my link to it,
but this is too not a
problem for now, at this moment i want just to modify body and see the
result. And i'm
already checking for OE_MSG_SEND_WND, don't worry about this.
I'll repeat what i'm trying to do, and what goes wrong:
I have the custom button on message compose window. When i click it,
it executes this sample code:
BSTR b = SysAllocString(L"<A href=\"http://google.com\">second google</
A>");
wnd->SetBodyHTML(&b);
SysFreeString(b);
but in message itself appears only this:
<A href="">second google</A>
VB EXE demo have pretty same behavior: I create new message in WM,
open it in VB
demo, set the body with well-formed html, and receive empty src or
href attributes.
With hope for fast and useful response,
Yuriy.
On Mar 26, 9:32 pm, Nektra OEAPI Support <oeapi-supp...@nektra.com>
wrote:
> Hi again Yuriy,
> Sorry about the delay, we had a national holiday here in between.
> We have tested setting the body text using the included OEAPI C++ EXE demo and it worked fine, we set the OE_MSG_SEND_WND style to display the link.
> Then we send the message and we check the sent message (In 'Sent Items') and the received message ('In Inbox'), the link works correctly and is opened on IE.
> There are some important details for this to work:
> If you set the body text on the OEAPIObj::OnNewMsgWnd event without checking the style, the body text will be set for EVERY message window, including the Preview Pane window where the current message is displayed, and also when you open (I.E. double click) any existing message (OE_MSG_DETAIL_WND).
> If you do not check for the window style, when you check the sent message, or the received message, each message window body is modified each time, and then the link does not work in this case, but this case should not be allowed to happen because you would be replacing ANY existing message body with your text/link body.
> So, as I wrote before, you should check that the message window is of "OE_MSG_SEND_WND" style. But even in this case, when the user chooses to Reply or Forward a message, you would replace quoted text for your link.
> So a correct way would be getting the existing HTML body first, and then adding your text/link to it.
> Another alternative to add text/link in every sent message is modifying them in the OnNewMesageInOutbox event.Thank you for contacting Nektra's OEAPI Support. Regards, Federico -- Nektra Advanced Computinghttp://www.nektra.com
> Yuriy Pavlovsky wrote:Hi, Federico, I've done what you said, but nothing changed, href still apears empty in body. My code: BSTR b = SysAllocString(L"<A href=\"http://google.com\">second google</ A>"); Inspecting body: <A href="">second google</A> On Mar 19, 5:57 pm, Nektra OEAPI Support<oeapi-supp...@nektra.com>wrote:Hi Yuriy, Try addinghttp://to your href, like this:BSTR b = SysAllocString(L"<A href=\"http://google.com\">google</A>");A note, just in case, if you want to set the body of the new message window only, you could make sure that thewindow styleis "OE_MSG_SEND_WND".Regards, Federico -- Nektra Advanced Computinghttp://www.nektra.com Yuriy Pavlovsky wrote:Hello. I'm developing c++ dll using OEAPI Enterprise edition v3.2.3 under Vista x86. On new message creation event, this code is executed: CComPtr<IOEMsgWnd> wnd = m_oeapi->GetMsgWnd(msgId); BSTR b = SysAllocString(L"<A href=\"google.com\">google</A>"); wnd->SetBodyHTML(&b); SysFreeString(b); But in message there is only underlined "google", without link itself. Using VB demo, ive inspected message, and found that its body contains only this : <A href="">google</A> If i add some url to href and press "Set Body", nothing changes, in fact, it is still without any url in href. Same happens when i try to add <IMG> tags - i receive empty src, no pictures displayed.
Regards, Federico -- Nektra Advanced Computing http://www.nektra.com
CComPtr<IOEMsgWnd> wnd = m_oeapi->GetMsgWnd(msgWndId);
/*note this block*/
BSTR b = SysAllocString(L"");
wnd->SetBodyHTML(&b);
SysFreeString(b);
/*noted block ends*/
IDispatchPtr dispatch = wnd->GetIHTMLDocument2();
CComPtr<IHTMLDocument2> htdoc;
dispatch->QueryInterface( __uuidof(IHTMLDocument2), (void **)&htdoc);
CComPtr<IHTMLElement> elem;
CComPtr<IHTMLDOMNode> domElement;
CComPtr<IHTMLDOMNode> domBody;
htdoc->createElement(L"<a>", &elem);
elem->put_innerText(L"google-link");
VARIANT var;
::VariantInit(&var);
var.vt = VT_BSTR;
V_BSTR(&var)=SysAllocString(L"http://google.com");
elem->setAttribute(L"href", var, 0);
CComPtr<IHTMLElement> body;
htdoc->get_body(&body);
body->QueryInterface(__uuidof(IHTMLDOMNode), (void **)&domBody);
elem->QueryInterface(__uuidof(IHTMLDOMNode), (void **)&domElement);
CComPtr<IHTMLDOMNode> generatedChild;
domBody->appendChild(domElement,&generatedChild);
About the noted block - without it program crashes with exception.
Dunno what it can it be, maybe something about I'm touching html body
and messages turns to html mode ?
With this block, code works, adds "google-link" to message, but again
only as text, no link at all.
With hope for some help,
Yuriy.
On May 14, 7:17 pm, Nektra OEAPI Support <oeapi-supp...@nektra.com>
wrote: