Hi,
I'm looking for a way to programatically generate keypress events in a C++ wxWidgets app, for testing a control that I had written.
Are there ways to do this?
Thanks a lot for the help!
Sahas
Hi,
I'm looking for a way to programatically generate keypress events in a C++ wxWidgets app, for testing a control that I had written.
Are there ways to do this?
Thanks a lot for the help!
Sahas
There is/will be wxUIActionSimulator in wx 2.9 soon (it's currently present in basic form in the trunk and in an improved one in one of svn branches which will be merged soon). You should be able to take the relevant files and use them with wx 2.8 too if you need but I haven't tested this.
You should first build a wxKeyEvent object, fill it with the necessary key information, and then call the ProcessEvent method of the target control.