我正在别的软件中打字,这时我的程序调用:SetWindowPos(&wndTopMost,  iX, iY, m_Bitmap.bmWidth, m_Bitmap.bmHeight, NULL); 
我的程序的界面显示出来,但我正在打字软件的焦点就丢失了,如何解决?谢谢

解决方案 »

  1.   

    SetWindowPos(&wndTopMost,  iX, iY, m_Bitmap.bmWidth, m_Bitmap.bmHeight, NULL); 之后
    改变当前的焦点可以吗
    用setfocus()
      

  2.   

    如果你用wndTopMost,就没有办法了。
      

  3.   

    CWnd *pWnd = CWnd::GetActiveWindow();SetWindowPos(&wndTopMost,  iX, iY, m_Bitmap.bmWidth, m_Bitmap.bmHeight, NULL); if(pWnd && pWnd->GetSafeHwnd())
        pWnd->SetActiveWindow();
      

  4.   

    也许可以,你试试
    SetWindows(&wndTopMost,ix,iy,m_bitmap.bmwidth,m_bitmap.bmHeight,SWP_NOACTIVATE)
      

  5.   

    SetActiveWindow()这个上应可以达到你的要求吧