GetActiveWindow()
WM_KEYDOWN
SetFocus

解决方案 »

  1.   

    CWnd::GetFocus  
    static CWnd* PASCAL GetFocus( );Return ValueA pointer to the window that has the current focus, or NULL if there is no focus window. The pointer may be temporary and should not be stored for later use.ResRetrieves a pointer to the CWnd that currently has the input focus.还有,可以拦截回车消息,然后用下边的函数
    CWnd::GetNextDlgTabItem  
    CWnd* GetNextDlgTabItem( CWnd* pWndCtl, BOOL bPrevious = FALSE ) const;Return ValuePointer 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.再SetFocus
      

  2.   

    用GetFocus();会返回有输入焦点的控件的句柄(包括editbox)。
      

  3.   

    响应键盘消息WM_KEYDOWN
    用GotoDlgCtrl()函数,把光标移到下一个EDIT控件上就可以了,
    不过你要把原来接受回车的那个按钮的属性改掉,使没有接受回车的默认控件,这可以在控件的属性当中设置。
    不知道这样说你明白么?
      

  4.   

    CWnd* pWnd = CWnd::GetFocus();
    int nID = ((CEdit*)pWnd)->GetDlgCtrlID ;
    //judge which editctrl has this nID;
    回车键会关闭对话框的,避免这样情况还要重载对话框的OnOK。
    我看用输入结束后,用Tab切换各个Edit挺好
      

  5.   

    GetFocus();
    or
    BOOL GetCursorPos(
      LPPOINT lpPoint   
    );
    HWND WindowFromPoint(
      POINT Point   
    );