Embedding C++ GUI app in Wt
Added by Bert Cuypers over 5 years ago
Hi all,
We are looking for a way to embed a C GUI application (.NET WinForms) in our Wt Application. Has anyone been able to do this, or do you have some ideas on how to get started?
Thanks in advance!
Best regards,
Bert
Replies (4)
RE: Embedding C++ GUI app in Wt - Added by Roel Standaert over 5 years ago
So you mean that your application has both a desktop GUI on the machine it runs on, and a web UI?
RE: Embedding C++ GUI app in Wt - Added by Bert Cuypers over 5 years ago
Hi Roel,
Thanks for the fast reply. Let me explain in more detail: the desktop GUI application is a different application from the Wt application. We do however want the possibility for Wt users to see what a user has been doing in the desktop GUI application (this is not a live stream!). For this, we record all inputs on the desktop GUI app (mouse clicks, text inputs, ... ), and we developed this app in such a way that it is able to "replay" all these inputs.
We would now like to develop the ability to show this "replay" in Wt. I am confident that this is a challenging task, if possible at all, hence my question if anyone has ideas on how to get started.
Thanks in advance,
Best regards,
Bert
RE: Embedding C++ GUI app in Wt - Added by Dave Soane over 5 years ago
Hi Bert,
Some time ago I faced the choice of whether to develop my own website as a console app or a proper Windows app. See [[[https://redmine.webtoolkit.eu/boards/1/topics/14956]]]
After sorting out the problem I was having with the console app, I carried on that way. But I suppose the only reason that one does it as a console app is that it's simpler. There is nothing stopping you producing a Wt app as a full Windows program.
So I would suggest that you add the Wt functionality to your existing Winforms "replaying" app, and propagate the changes to your web clients with WApplication~~processEvents(); Or possibly something else~~ the boffins here may have other ideas.
Come to think of it, why DOES the replayer need to be a Winforms app? Since the Windows replayer and the Web replayer are effectively going to be different programs, there is no real need for them to be the same app. You will have to design the web interface to look like the Windows one, you can't simply SHOW the windows page to your web client (well, not easily anyway). So you would create a normal Wt console app that produces a web page that is made to look like the Windows interface, as far as possible.
One other concern:
If the idea is for the web user to log on at any time, and invoke the start of replaying at their leisure, then no problem - you just go through the replay file at the speed it was created, with delays etc as necessary. However, should the idea be for all users to log on, and then the replay to be begun at the server, that is another matter, and I don't know how one would would synchronise multiple separate sessions from a thread separate to them all. Unless they simply watched for a signal of some kind. There may be a way for the Webmaster to invoke something in all sessions simultaneously, I'm not sure.
Interesting project.
Dave.
RE: Embedding C++ GUI app in Wt - Added by Mark Petryk over 5 years ago
I would consider not only recording 'events' such as keystrokes and mouse moves, but you could also easily capture a screen-shot at the time of the key/mouse event. You would be able to replay all of that back to a Wt app... just thinking out loud.