delphi sample

5 views
Skip to first unread message

yarek

unread,
Dec 12, 2006, 1:08:00 PM12/12/06
to Nektra OEAPI Support
Hi.
I am trying to add a toolbar to the SEND windows:

This works fine !

OEToolbar2.CreateInMsgWnd(OE_MSG_SEND_WND Or OE_MSG_DETAIL_WND,1);
OEToolbar2.SetLargeButtons(0);
OEToolbar2.GetID(i);
OEButton2.Create1(i,'webcam',s+'webcam.bmp',s+'webcam.bmp');


Then on CLICK this button, insert some HTML text:

procedure TForm1.OEButton2MsgWndClick(Sender: TObject; msgWndId:
Integer);
var s:widestring;
begin
MessageDlg('THIS WORKS FINE', mtWarning, [mbOK], 0);
// it shows the showmessage dialog !
OEMsgWnd1.GetBody(s);
// s is ALWAYS EMPTY !
showmessage(s);
s:='hello world';
OEMsgWnd1.SetBodyHTML(s);
// Nothing happens here !
end;


1) How do I get (ENTREPRISE version) the HTML text from the SendMessage
window ?
2) Is it possible to INSERT some text from the CURSOR:
ex:
hello wo|rld (the cursor is between letters o and r)
I press the button and I insert some text between these letters
hello wo[INSERTEDTEXT]rld ?

Thanks again

Ismael Bejarano

unread,
Dec 12, 2006, 1:58:57 PM12/12/06
to Nektra...@googlegroups.com
Hi Yarek

You should obtain the OEMsgWnd from a TOEAPIObj using msgWndId:
OEAPI.GetMsgWnd(msgWndId, msgWnd);

Now calling msgWnd.GetBody(s) you should get the body of the message.

To insert some text you can try OEMsgWnd.SendKey.

Ismael


--
Nektra
http://www.nektra.com

yarek

unread,
Dec 12, 2006, 6:59:10 PM12/12/06
to Nektra OEAPI Support
Thanks for your reply.
I do not know if SendKey is the solution:
- is there a way to know if the cursor is the BODY part instead of the
SUBJECT or DESINTAION part ?

The purpose is to insert some SMILEYS:
- I have to select an image : simulate a CTRL+C to put the image into
the clipboard
- TEST if the cursor is in the BODY part : HOW CAN I DO THIS ?
- If YES, then simulate a CTR+V to paste from clipboard.

Is there any other smarter way to do it ?

Reply all
Reply to author
Forward
0 new messages