mrjt Messages: 705 Registered: March 2007 Location: London
Contributor
I don't think there is a direct way of doing this. What you do is overload the parent window's Key handler:
bool Key(dword key, int count) {
if (key == K_F5) {
button.PseudoPush();
return true;
}
return TopWindow::Key(key, count);
}
Doing it this way also permits user-defined keys. I suggest you look at the reference/AK package or how to do this with very little effort. You basically just have to defined the keys then replace F5 with AK_whatever.