bool SetWindowTop(CWnd* pWnd)
{
if(!pWnd)
{
   return false;
}
if(pWnd->GetExStyle()&WS_EX_TOPMOST)
{
   return true;
}
else
{
   int i= pWnd->SetWindowPos(&CWnd::wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
   if (i==0)
    return false;
   else
    return true;

}
}

//取消窗口置顶
CancelWindowTop(CWnd* pWnd)
{
if(pWnd)
{
   int x=pWnd->SetWindowPos(&CWnd::wndNoTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
   if(x==0)
    return false;
   else
    return true;
}
else
{
   return false;
}
}

相关文章:

  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案