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
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
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 ?