Click here to Skip to main content
16,005,339 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionStyle/method question regarding dialog updates/calcs Pin
ldsdbomber11-Feb-07 22:53
ldsdbomber11-Feb-07 22:53 
AnswerRe: Style/method question regarding dialog updates/calcs Pin
Naveen11-Feb-07 23:19
Naveen11-Feb-07 23:19 
AnswerRe: Style/method question regarding dialog updates/calcs Pin
jhwurmbach11-Feb-07 23:20
jhwurmbach11-Feb-07 23:20 
QuestionShellExecute Pin
si_6911-Feb-07 22:37
si_6911-Feb-07 22:37 
AnswerRe: ShellExecute Pin
Eytukan11-Feb-07 22:52
Eytukan11-Feb-07 22:52 
AnswerRe: ShellExecute Pin
si_6912-Feb-07 1:11
si_6912-Feb-07 1:11 
AnswerRe: ShellExecute Pin
David Crow12-Feb-07 2:36
David Crow12-Feb-07 2:36 
QuestionSelecting polygons Pin
m.dietz11-Feb-07 22:20
m.dietz11-Feb-07 22:20 
Hi,

A few days before i asked about a library or document link to handle polygons, so far without answer, so I think I'll ask some more specific questions, and see if anyone can help me...

Current problem is how to select and activate a polygon. I built up a CTypedPtrList that holds Polygons, which consist mainly in a CList of CPoints (like in the scribble tutorial, but instead of CStrokes I use my own Polygon class). That helps me as far as drawing the polygons with CDC::Polygon command, but to move and manipulate the Polygon the next step is to let the user select one by mouseclick.

And here the big problem comes to light: how can I select a polygon (whose data structure exists as a series of points) by only knowing where the user clicked? Are there special commands (like drawing the polygon with CDC:Polygon) to know wether a given point is in the "inner" area of a polygon giving the clicking position and an array of CPoints? Do some special commands exist that can detect the whole polygon by giving a point in or near the polygon?

And with editing a polygon some similar questions arise when trying to detect which vertex of the polygon was chosen to move/delete or which line to insert a new vertex.

And one more question about drawing the polygon: is there a way to fill the polygon with a transparent brush, e.g. a hatching that let the structure of polygons below that shine through?

Can anyone help with these problems or suggest any good readings in that topic? Any help is appreciated, but please keep in mind that I'm still learning programming under Windows/MFC, so don't expect knowledge too deep in MFC technology.

Martin Dietz
AnswerRe: Selecting polygons Pin
Cedric Moonen11-Feb-07 23:11
Cedric Moonen11-Feb-07 23:11 
AnswerRe: Selecting polygons Pin
beko11-Feb-07 23:43
beko11-Feb-07 23:43 
GeneralRe: Selecting polygons Pin
m.dietz12-Feb-07 1:02
m.dietz12-Feb-07 1:02 
AnswerRe: Selecting polygons Pin
Mark Salsbery12-Feb-07 6:43
Mark Salsbery12-Feb-07 6:43 
QuestionNow, how to delete? Pin
Astricks11-Feb-07 22:06
Astricks11-Feb-07 22:06 
AnswerRe: Now, how to delete? [modified] Pin
jhwurmbach11-Feb-07 22:27
jhwurmbach11-Feb-07 22:27 
GeneralRe: Now, how to delete? Pin
Astricks11-Feb-07 22:48
Astricks11-Feb-07 22:48 
GeneralRe: Now, how to delete? Pin
jhwurmbach11-Feb-07 23:04
jhwurmbach11-Feb-07 23:04 
GeneralRe: Now, how to delete? Pin
Astricks11-Feb-07 22:50
Astricks11-Feb-07 22:50 
GeneralRe: Now, how to delete? Pin
Hamid_RT12-Feb-07 6:56
Hamid_RT12-Feb-07 6:56 
GeneralRe: Now, how to delete? Pin
jhwurmbach12-Feb-07 6:58
jhwurmbach12-Feb-07 6:58 
GeneralRe: Now, how to delete? Pin
Hamid_RT12-Feb-07 7:15
Hamid_RT12-Feb-07 7:15 
GeneralRe: Now, how to delete? Pin
toxcct12-Feb-07 20:25
toxcct12-Feb-07 20:25 
AnswerRe: Now, how to delete? Pin
toxcct11-Feb-07 22:28
toxcct11-Feb-07 22:28 
GeneralRe: Now, how to delete? Pin
Astricks11-Feb-07 22:48
Astricks11-Feb-07 22:48 
Questionclass library Pin
dalbhide bipin11-Feb-07 21:03
dalbhide bipin11-Feb-07 21:03 
AnswerRe: class library Pin
Cedric Moonen11-Feb-07 21:10
Cedric Moonen11-Feb-07 21:10 

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.