setting the correct trap for the mouse...
okie, i am trying to include mouse support to a specific menu.
lets say, in a rectangle, of sample coordinates x1,y1 & x2,y2.
most of the time, the mouse always "detects outside" that range.
anyone has a good solution?
Not sure if this is what you mean or not, but you could use PtInRect to test it. ie:
You would have a POINT called ptMouse and a RECT called rcBtn.
To test if the mouse is over the button you would use:
if(PtInRect(&rcBtn,ptMouse)!=0)
{
//the mouse is over the button
}
You would have a POINT called ptMouse and a RECT called rcBtn.
To test if the mouse is over the button you would use:
if(PtInRect(&rcBtn,ptMouse)!=0)
{
//the mouse is over the button
}
MSVC++ 6DirectX 7
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement