탭 키를 제어하는 함수


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();

좋은 웹페이지 즐겨찾기