Page 1 of 1

Sample HtmlEdit_2

Posted: Thu Jan 29, 2015 12:06 pm
by Wolfgang Ciriack
Hi Roger,
i am thinking of using the DCHTML example in my app for editing text. I think the subclassing of a dcmultiline is very good.
There are two issus i can not get to work.
1. the context menu (copy/paste/select all) does not work in this sample (error: method is unknown for this object: handleMessage)
2. I like to insert text at the cursor position from an DCPUSHBUTTON, is this possible ?

Thanks, Wolfgang

Re: Sample HtmlEdit_2

Posted: Fri Jan 30, 2015 7:52 am
by rdonnay
Wolfgang -

Your handleMessage error makes me believe you are using eXpress++ build 259 or earlier.
This error was fixed in build 260:

1279. Fixed a regression error in build 259 that is caused when using menus
that are not derived from DC_XbpMenu().

Inserting text is a different issue.

This editor is derived from the XbpHtmlViewer() class which is based on the Internet Explorer ActiveX control.

I found that the paste works because it calls SendCtrlKey( VK_V ).
So, what you can do is use the button to copy text to the copy/paste buffer using XbpClipBoard() and then call SendCtrlKey( VK_V ).

Re: Sample HtmlEdit_2

Posted: Fri Jan 30, 2015 11:45 pm
by Wolfgang Ciriack
Thank you Roger, you are right, I am still using 259, i will try it with 260 and use your suggestion with the clipboard.