Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Replaying Events in VC++/MFC

p_khasnisp_khasnis Member Posts: 3
Hello,

I have a question regarding Replaying of events captured from a CHTMLView . I want to know if there is any way by which i can replay an event (like a mouseclick on a button or on a href link in a webpage, and / or a key capture) captured from a webcontrol in a application. If so i would appreciate your help.

I have been able to capture the event but now i dont know how to replay it back. Its an MFC based application with view class derived from CHTMLView.

Thanks in advance.
pk.

Comments

  • DirectAnimDirectAnim Member Posts: 10
    I'm not sure what you mean by "replaying an event". I think what you want to do is fire the event again with the same parameters as its last call. This you can do by using some well-placed static variables in your event handlers and calling the event handlers themselves from wherever they need to be called as though you were calling another function from the same class (They are all functions, after all).

    But I need more information if I can help you. What do you mean by "replaying an event"?
  • p_khasnisp_khasnis Member Posts: 3
    Hi there,

    Thanks, maybe i was not clear when i am saying "Replaying", what i want
    to really do is as follows;

    1. say there is an HTMLElement(button) on the webpage that is displayed in the control and a user clicks on it. I am able to catch the event that has occured.

    2. Now i want to replay the same occurence on the same page. I mean , load the page and perform click on the button.

    I have tried using SetWindowsHookEx function with WH_JOURNALPLAYBACK and WH_JOURNALRECORD and though it works, i want the events restricted to the webcontrol.

    I am trying to achieve the same by using IHTMLElement3::fireEvent(). I wanted help in this regards too.

    Thanking u again.





    : I'm not sure what you mean by "replaying an event". I think what you want to do is fire the event again with the same parameters as its last call. This you can do by using some well-placed static variables in your event handlers and calling the event handlers themselves from wherever they need to be called as though you were calling another function from the same class (They are all functions, after all).
    :
    : But I need more information if I can help you. What do you mean by "replaying an event"?
    :
  • Shawn CarterShawn Carter Member Posts: 0

    ________ ( http://forcoder.org ) free ebooks and video tutorials about \ MATLAB Java Visual Basic Swift Go C PHP Visual Basic .NET Delphi Ruby R Perl C++ PL/SQL C# Objective-C Assembly Scratch Python JavaScript Crystal Awk Hack Lua VBScript ML SAS Clojure FoxPro D Scala Rust Alice Fortran COBOL Scheme Prolog Lisp Ada Bash Julia Transact-SQL LabVIEW ABAP Apex Dart Logo Kotlin F# Erlang \ ______________

Sign In or Register to comment.