Page 1 of 1

Cut, Copy and Paste

Posted: 26 Nov 2008, 11:32
by bjoernlueders
Is there a way to get control over the ContextMenu (cut, copy and paste) from "outside" (i.e. a menu)?

Re: Cut, Copy and Paste

Posted: 26 Nov 2008, 13:17
by TiKu
What do you mean by "control", i. e. what do you want to achieve?

Re: Cut, Copy and Paste

Posted: 26 Nov 2008, 13:22
by bjoernlueders
I want to apply an "edit"-menu with the items cut, copy and paste.

Re: Cut, Copy and Paste

Posted: 26 Nov 2008, 13:33
by TiKu
I see. Well, the context menu is provided by the system, so it's difficult if not impossible (I don't know a way to do it) to reuse it.

Re: Cut, Copy and Paste

Posted: 26 Nov 2008, 13:51
by bjoernlueders
Sorry that I didn't google better at first:

http://www.devx.com/vb2themax/Tip/18632

Now it's working.

Re: Cut, Copy and Paste

Posted: 26 Nov 2008, 14:03
by TiKu
I knew about these messages, but didn't name them, because you still should check whether there is something to copy/cut/delete (i.e. there is text selected) or whether the control can handle the data contained in the clipboard and there are no messages like WM_CANCOPY or WM_CANPASTE. So these messages alone are not very helpful in my opinion.