?
Solved

how do i ..?

Posted on 1998-02-12
7
Medium Priority
?
190 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 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