Solved

TEdit default Popup Menu

Posted on 1998-09-18
2
444 Views
Last Modified: 2012-05-05
If a PopupMenu is not specified for an Edit control. A default PopupMenu is displayed. I would like to find out the whereabouts of this menu as I am looking to copy the functionality in terms of disabling options depending on whether text is selected or the clipboard is empty into the Main Menu.
0
Comment
Question by:archapman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
erajoj earned 100 total points
ID: 1340111
Hi,
I haven't found the menu and don't think it exists other than when it's visible. But to copy the functionality, do this:

&Undo
-----
Cu&t
&Copy
&Paste
&Delete
-----
Select &All

Undo     = Boolean( SendMessage( Edit.Handle, EM_CANUNDO, 0, 0 ) );
Copy/Cut/Delete = Edit.SelLength > 0;
Paste = Clipboard.HasFormat( CF_TEXT ); // uses clipbrd
SelectAll => SendMessage( Edit.Handle, EM_SETSEL, 0, -1 );

Thats it.

/// John
0
 

Author Comment

by:archapman
ID: 1340112
Thanks - just what I was looking for.


0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question