- Joined
- Mar 28, 2008
- Messages
- 671
- Reaction score
- 32
- Points
- 43
Hi,
the following code can draw a circle relativ to the position of the mousecursor on the monitor (by using windows.h ) at the mfd:
My qutestion is now, how can i get the "position of the mousecursor over the MFD" / HDC-Object to draw the circle where the mousecursor is (if mousecursor is over the mfd)?
any ideas??
the following code can draw a circle relativ to the position of the mousecursor on the monitor (by using windows.h ) at the mfd:
Code:
void CircleMFD::Update (HDC hDC)
{
MFD_HDC = hDC;
SetTextColor(MFD_HDC,GREEN); //Setting up the color...
POINT pos;
GetCursorPos(&pos);
int RADIUS = 15;
Ellipse (MFD_HDC,
pos.x - RADIUS,
pos.y + RADIUS,
pos.x + RADIUS,
pos.y - RADIUS);
}
any ideas??