[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

how do i ..?

Posted on 1998-02-12
7
Medium Priority
?
192 Views
Last Modified: 2010-04-04
how do i get the last action perform by a user
and then undo it?
like the notepad application, u type in some words
and u undo..that is delete ..and then undo...u get the words
back..and change font back etc..
0
Comment
Question by:superboy
[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
7 Comments
 
LVL 2

Expert Comment

by:Waldek
ID: 1359058
I think You must save some parametersin list of history. If user select undo You must go to history and back with saved information
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1359059
To give you some code would be very involving (even if the points were 200).

Would you be satisfied with a "the way to go"?
0
 
LVL 1

Expert Comment

by:dvaline
ID: 1359060
If you search the registry you'll notice that alot of the undo information is written and extracted form the registry.  You need to come up with a schema to be able to get in out values that you can interpret to actions.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:superboy
ID: 1359061
is there another way besides using the registry?
0
 
LVL 4

Expert Comment

by:d003303
ID: 1359062
- create an action object that encapsulates ANY operation that can be done in your program
- keep a history list that stores action objects
- After each action, create a new action object with the new document state and set the old action object to the history list

Slash/d003303
0
 

Expert Comment

by:jpussacq
ID: 1359063
Supose that you are using a TRichEdit.
To get the last action perform by a user in the RichEdit1,
write the following lines in the Button "Undo" OnClick event:

if RichEdit1.HandleAllocated then
   SendMessage(RichEdit1.Handle, EM_UNDO, 0, 0);



0
 

Accepted Solution

by:
jpussacq earned 20 total points
ID: 1359064
Supose that you are using a TRichEdit.
To get the last action perform by a user in the RichEdit1,
write the following lines in the Button "Undo" OnClick event:

  if RichEdit1.HandleAllocated then
     SendMessage(RichEdit1.Handle, EM_UNDO, 0, 0);


0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

650 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