Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 TCustomControl 的后代,并且希望在用户按下 Tab 键时对其进行处理。但是当我按 Tab 键时,表单上的焦点控件刚刚改变。并且 OnKeyDown 和 OnKeyPress 事件没有触发。如何解决问题?
让组件处理WM_GETDLGCODE消息,以便它可以返回DLGC_WANTTAB标志。有关示例,请参阅此问题的答案。
WM_GETDLGCODE
DLGC_WANTTAB