我在一个控件的单击事件中改变了一个编辑框控件的值,但是变完后,我想让这个编辑框事件失去焦点,应该怎么做呢?

解决方案 »

  1.   

    ReleaseCapture
    The ReleaseCapture function releases the mouse capture from a window in the current thread and restores normal mouse input processing. A window that has captured the mouse receives all mouse input, regardless of the position of the cursor, except when a mouse button is clicked while the cursor hot spot is in the window of another thread. BOOL ReleaseCapture(VOID);
      

  2.   

    并且有用SetFocus把焦点给另外一个程序也可以哦The SetFocus function sends a WM_KILLFOCUS message to the window that loses the keyboard focus and a WM_SETFOCUS message to the window that receives the keyboard focus. It also activates either the window that receives the focus or the parent of the window that receives the focus. 
      

  3.   

    SetFocus(...);
    不设在自己上面就行了