-
August 4th, 2006, 02:42 AM
#1
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?
-
August 4th, 2006, 02:55 AM
#2
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.
-
August 4th, 2006, 02:56 AM
#3
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|