如何SendMessage(GetParentForm(Self).Handle, WM_NEXTDLGCTL, 0, 0)(50分)

  • 主题发起人 主题发起人 x_ws
  • 开始时间 开始时间
X

x_ws

Unregistered / Unconfirmed
GUEST, unregistred user!
请问与SendMessage(GetParentForm(Self).Handle, WM_NEXTDLGCTL, 0, 0)
相反的操作是?
此操作是使光标跳到下一个TAB,那么如何跳到上一个TAB呢
 
SendMessage(GetParentForm(Self).Handle, WM_NEXTDLGCTL, 0, 1)
 
cbtea兄, SendMessage(GetParentForm(Self).Handle, WM_NEXTDLGCTL, 0, 1)不行啊.

 
可以用
FindNextControl(Sender as TWinContorl, true, false, false).SetFocus
 
SendMessage(GetParentForm(Self).Handle, WM_NEXTDLGCTL, 1, 0)
 
var
WinControl: TWinControl;
begin
WinControl := FindNextControl(ActiveControl, True, True, False);//Foreward
WinControl := FindNextControl(ActiveControl, False, True, False);//Backword
if Assigned(WinControl) and WinControl.CanFocus then
WinControl.SetFocus;
end;

SendMessage(GetParentForm(Self).Handle, WM_NEXTDLGCTL, 0, 0);//Foreward
SendMessage(GetParentForm(Self).Handle, WM_NEXTDLGCTL, 1, 0);//Backward
 
多人接受答案了。
 
后退
顶部