Reputation: 3921
I have a form and I've passed its handle to the OpenGL class to draw. I want to get keyboard commands from the user but it seems the procedures for getting the keys doesn't run (I've tested it). Although, I am using OnMouseDown with no problem at all.
Is there anything I am missing here? Anyone has a solution?
Upvotes: 1
Views: 1782
Reputation: 181735
It's been ages since I used VCL (with C++Builder 3), but if it's still the same as in the old days, you might want to set KeyPreview
on your form to True
. That will cause the form to receive events that normally would only go to controls.
Upvotes: 2