DUILib 中的 caption="x1,y1,x2,y2"
x1 距离左边界的距离;rcCaption.left
y1 距离上边界的距离; rcCaption.top
x2 距离右边界的距离;rcCaption.right
y2 距离上边界的距离; rcCaption.bottom

rcClient 为客户区域大小

标题栏范围:
"rcClient.left + rcCaption.left(左边界坐标), rcCaption.top(上边界坐标),
rcClient.right - rcCaption.right(右边界坐标), rcCaption.bottom(下边界坐标)“

1
RECT rcCaption = m_PaintManager.GetCaptionRect(); 2 if( pt.x >= rcClient.left + rcCaption.left && pt.x < rcClient.right - rcCaption.right \ 3 && pt.y >= rcCaption.top && pt.y < rcCaption.bottom ) { 4 CControlUI* pControl = static_cast<CControlUI*>(m_PaintManager.FindControl(pt)); 5 if( pControl && _tcsicmp(pControl->GetClass(), _T("ButtonUI")) != 0 && 6 _tcsicmp(pControl->GetClass(), _T("OptionUI")) != 0 && 7 _tcsicmp(pControl->GetClass(), _T("TextUI")) != 0 ) 8 return HTCAPTION; 9 }

 

相关文章:

  • 2022-01-19
  • 2021-12-01
  • 2021-05-24
  • 2022-02-25
  • 2021-09-14
  • 2021-04-17
  • 2021-08-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-01-20
  • 2022-02-15
  • 2022-12-23
相关资源
相似解决方案