selecting control points with OnLButtonDown
-
Hello, I am new to MFC so i have a question on how properly select a control point. When i click on the screen with my left mouse i want to select that point for my line drawing. So when i click on that spot ones and then by just moving a mouse without holding on the button i could draw a line and with right mouse click end this control point. Does anyone know of a good source to do this? Or how to tell the program that i want to select that point... thanks
-
Hello, I am new to MFC so i have a question on how properly select a control point. When i click on the screen with my left mouse i want to select that point for my line drawing. So when i click on that spot ones and then by just moving a mouse without holding on the button i could draw a line and with right mouse click end this control point. Does anyone know of a good source to do this? Or how to tell the program that i want to select that point... thanks
Save the point in
OnLButtonDown
to a variable within your program and then use that point as reference to line drawing calls likeLineTo
. You may also want to set a flag inOnLButtonDown
and reset it inOnRButtonDown
. Also take a look atSetCapture
andReleaseCapture
to capture and release the mouse.«_Superman_»