Click here to Skip to main content
16,007,814 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPDF Reader Pin
AG29-May-01 19:41
AG29-May-01 19:41 
GeneralUsing CMonthCalCtrl in a View Pin
29-May-01 19:25
suss29-May-01 19:25 
GeneralRe: Using CMonthCalCtrl in a View Pin
29-May-01 22:06
suss29-May-01 22:06 
GeneralRe: Using CMonthCalCtrl in a View Pin
30-May-01 4:08
suss30-May-01 4:08 
Questionhow can i select a particular object using the list pointers to objects? Pin
pathi29-May-01 19:04
pathi29-May-01 19:04 
AnswerRe: how can i select a particular object using the list pointers to objects? Pin
Christian Graus29-May-01 19:16
protectorChristian Graus29-May-01 19:16 
GeneralRe: how can i select a particular object using the list pointers to objects? Pin
pathi30-May-01 3:18
pathi30-May-01 3:18 
GeneralRe: how can i select a particular object using the list pointers to objects? Pin
Christian Graus30-May-01 11:28
protectorChristian Graus30-May-01 11:28 
Now this is a little different. I presume you've got a list of pointers to objects that tell you the points you've drawn lines between ? If not, then you do not have a prayer, but I'm not sure if you do because if you do then your original question was too vague to be answerable.

You need to iterate through your list of points and figure out if the point you have selected sits on one of the lines. I've had a quick scan of 'principles & practice' but cannot see an algorithm for finding if a point is in a line. ( I'm sure it's there, but it's early and I am tired ). One way to do it would be

a/ find out first if the point is in the bounding box of the two points.
b/ figure out the ratio between x and y.
c/ apply that ratio to the x value of your point and see if the y value corresponds within an acceptable margin.

I suspect something with paths is also possible.




Christian

#include "std_disclaimer.h"

People who love sausage and respect the law should never watch either one being made.

The things that come to those who wait are usually the things left by those who got there first.

GeneralAdd Column in DataGRid Control???URGENT!!!! Pin
29-May-01 18:35
suss29-May-01 18:35 
QuestionSDI OnOpenFile????? Pin
29-May-01 18:21
suss29-May-01 18:21 
AnswerRe: SDI OnOpenFile????? Pin
Christian Graus29-May-01 19:17
protectorChristian Graus29-May-01 19:17 
QuestionHow to find hostnames and IP in network? Pin
29-May-01 17:02
suss29-May-01 17:02 
AnswerRe: How to find hostnames and IP in network? Pin
Ghazi H. Wadi30-May-01 12:09
Ghazi H. Wadi30-May-01 12:09 
GeneralMSControl on ATL dialog Pin
29-May-01 16:13
suss29-May-01 16:13 
GeneralRe: MSControl on ATL dialog Pin
Matt Philmon29-May-01 17:22
Matt Philmon29-May-01 17:22 
GeneralRe: MSControl on ATL dialog Pin
29-May-01 18:01
suss29-May-01 18:01 
GeneralRe: MSControl on ATL dialog Pin
Matt Philmon30-May-01 6:42
Matt Philmon30-May-01 6:42 
GeneralRe: MSControl on ATL dialog Pin
30-May-01 10:43
suss30-May-01 10:43 
GeneralRe: MSControl on ATL dialog Pin
Matt Philmon30-May-01 17:24
Matt Philmon30-May-01 17:24 
GeneralRe: MSControl on ATL dialog Pin
Matt Philmon30-May-01 17:41
Matt Philmon30-May-01 17:41 
GeneralRe: MSControl on ATL dialog Pin
30-May-01 19:04
suss30-May-01 19:04 
GeneralRe: MSControl on ATL dialog Pin
Matt Philmon31-May-01 4:07
Matt Philmon31-May-01 4:07 
GeneralRe: MSControl on ATL dialog Pin
31-May-01 4:20
suss31-May-01 4:20 
GeneralRe: MSControl on ATL dialog Pin
Matt Philmon31-May-01 10:23
Matt Philmon31-May-01 10:23 
GeneralUnicode Clipboard Pin
29-May-01 13:41
suss29-May-01 13:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.