Solved

TEdit default Popup Menu

Posted on 1998-09-18
2
446 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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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