rightdownRect.left = m_Rect.right-8; rightdownRect.top = m_Rect.bottom-8;
rightdownRect.right = m_Rect.right+8; rightdownRect.bottom = m_Rect.bottom+8;
if (inRect.PtInRect(point)) //在内
{
lRslt = SUBWIN_IN;
goto ERR_END;
}
if (upRect.PtInRect(point))
{
lRslt = SUBWIN_UP;//在上
goto ERR_END;
}
if (downRect.PtInRect(point))
{
lRslt = SUBWIN_DOWN;//在下
goto ERR_END;
}
if (leftRect.PtInRect(point))
{
lRslt = SUBWIN_LEFT;//在左
goto ERR_END;
}
if (rightRect.PtInRect(point))
{
lRslt = SUBWIN_RIGHT;
goto ERR_END;
}
if (leftupRect.PtInRect(point))
{
lRslt = SUBWIN_WN;//在左上
goto ERR_END;
}
if (rightupRect.PtInRect(point))
{
lRslt = SUBWIN_NE;//在右上
goto ERR_END;
}
if (leftdownRect.PtInRect(point))
{
lRslt = SUBWIN_SW;//在左下
goto ERR_END;
}
if (rightdownRect.PtInRect(point))
{
lRslt = SUBWIN_ES;//在右下
goto ERR_END;
}
ERR_END:
return lRslt; }
|