Advertisement

setting the correct trap for the mouse...

Started by May 03, 2002 07:31 AM
1 comment, last by edwinnie 22 years, 7 months ago
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
}
MSVC++ 6DirectX 7
Advertisement
nope, din work

This topic is closed to new replies.

Advertisement