Re: Logging starategy

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Logging has nothing to do with replaying, and in fact replaying has numerous technical
challenges, which require a lot of work to overcome.

Logging WM_ messages will almost certainly result in failure. Imagine that you log a
message OnRButtonDown which has a particular x,y coordinate. Play it back with the
application a half-inch to the left. What do you think you will get?

One approach is to divide your program into two components: GUI manipulation and object
manipulation. The GUI is just a way to manipulate objects. Record the object
manipulations and ignore the existence of the GUI.

Note that this only works if your initial state on replay is identical to the initial
state during recording.
joe

On Thu, 16 Oct 2008 02:57:52 -0700 (PDT), Kuenga <sagkumar@xxxxxxxxx> wrote:

Hi,

I am working on an MFC application and want to record all the events
carried out by user. Selecting a object, a menu item, invoking dialog
etc, so that I can replay it later.

What's the strategy to start with ? Which desing pattern suitable for
this ?

By logging the WM_message, is it a good idea and then for replay I use
POSTMessage ?
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.


Quantcast