-
Selecting a line
Hi,
Could anybody please explain how the selection mechanism works?
ie. I have drawn a straight line on a dialog window using the MoveTo() and LineTo() functions.Now, if I click on a point on that line, i want the line to be selected. I have seen in applications like MS Word that when you click a line object it gets selected;two tiny squares appear on either end of the line making it appear selected.How can we select a line drawn on a dialog window in VC++ so that we can rotate and cut the line into a number of segments etc?
-
Re: Selecting a line
Hi,
Take a look at the PtInRegion and PtInRect functions in the MSDN.
Before that, take a look at the DrawCli sample in the MSDN. That sample
would give you a good start.
-
Re: Selecting a line
Well, it doesn't work like that. ;) The LineTo is used to draw a line in a device context. In MS Word, the lines are objects that are inserted into the document. It's a different ball game. ;)