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
Solved

how do i ..?

Posted on 1998-02-12
7
180 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

808 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