I’ve got a custom control that descends from TTreeView. I’m trying to give it special behavior when the user presses ENTER while the control is focused, by giving it a WM_CHAR handler that responds to VK_RETURN, but it never gets called.
I tried making sure that it would accept all keyboard input by adding a WM_GETDLGCODE handler that says msg.Result := msg.Result or DLGC_WANTALLKEYS;. Now it receives the ENTER key, but the arrow keys no longer work!
Anyone have any idea how I can fix this correctly?
I always do
when writing text editors. Maybe you just forgot
DLGC_WANTARROWS?