WM_NEXTDLGCTL:
Parameters
wCtlFocus
Value of wParam. If the fHandle parameter is TRUE, the wCtlFocus parameter identifies the control that receives the focus. If fHandle is FALSE, wCtlFocus is a flag that indicates whether the next or previous control with the WS_TABSTOP style receives the focus. If wCtlFocus is zero, the next control receives the focus; otherwise, the previous control with the WS_TABSTOP style receives the focus.
fHandle
Value of lParam. Contains a flag that indicates how Windows uses the wCtlFocus parameter. If the fHandle parameter is TRUE, wCtlFocus is a handle associated with the control that receives the focus; otherwise, wCtlFocus is a flag that indicates whether the next or previous control with the WS_TABSTOP style receives the focus.
procedure TForm1.Button1Click(Sender: TObject);
VAR
m:TWMNextDlgCtl;
begin
m.CtlFocus:=0;
m.Handle:=false;
//m.handle=true:下一个控件;false:上一个控件
perform(WM_NEXTDLGCTL,0,0);
end;