Solved

how do i ..?

Posted on 1998-02-12
7
176 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
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

911 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

24 Experts available now in Live!

Get 1:1 Help Now