Solved

how do i ..?

Posted on 1998-02-12
7
175 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
7 Comments
 
LVL 2

Expert Comment

by:Waldek
Comment Utility
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
Comment Utility
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
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:superboy
Comment Utility
is there another way besides using the registry?
0
 
LVL 4

Expert Comment

by:d003303
Comment Utility
- 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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now