用于控制Tab键的函数

 
关于CWnd::GetNextDlgTabItem
CWnd* CWnd::GetNextDlgTabItem(
        CWnd* pWndCtl, 
        BOOL bPrevious = FALSE) const;
COleControlSiteOrWnd* CWnd::GetNextDlgTabItem(
           COleControlSiteOrWnd *pCurSiteOrWnd, 
        BOOL bPrevious) const;
Retrieves a pointer to the first control that was created with the WS_TABSTOP style and that precedes or follows the specified control.
The input focus directs all subsequent keyboard input to this window. Any window that previously had the input focus loses it. The SetFocus member function sends a WM_KILLFOCUS message to the window that loses the input focus and a WM_SETFOCUS message to the window that receives the input focus. It also activates either the window or its parent.
If the current window is active but does not have the focus (that is, no window has the focus), any key pressed will produce the messages WM_SYSCHAR, WM_SYSKEYDOWN, or WM_SYSKEYUP.
Parameters
pWndCtl
Identifies the control to be used as the starting point for the search.
pCurSiteOrWnd
Identifies the COleControlSiteOrWnd control. For more information about COleControlSiteOrWnd, see CWnd::GetNextDlgGroupItem.
bPrevious
Specifies how the function is to search the dialog box. If TRUE, the function searches for the previous control in the dialog box; if FALSE, it searches for the next control.
Return Value
Pointer to the previous or next control that has the WS_TABSTOP style, if the member function is successful. The returned pointer may be temporary and should not be stored for later use.
例如:
CWnd* pWnd = GetParent()->GetNextDlgTabItem(this);
if (pWnd)
      pWnd->SetFocus();
else
      GetParent()->SetFocus();
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值