Re: Create an object surface using GDI+

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



You didn't look closely enough at the sample code.
Basically, in the onclick event or any of the
mouse down or mouse up events, you grab
the x,y of the clicked section and see if it
is a match on the drawn objects.

The sample code figures out the dimensions
that the object should contain when drawn.
You can always iterate back through
the collections and figure out what item
was drawn where.

--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://robbemorris.blogspot.com





"Alejandro Serrano" <trupill@xxxxxxxx> wrote in message
news:eNnUhlk%23FHA.916@xxxxxxxxxxxxxxxxxxxxxxx
> Robbe Morris [C# MVP] escribió:
>> This might be a good start depending on
>> your requirements.
>>
>> http://www.eggheadcafe.com/articles/draw_tree_with_gdi_plus.asp
>>
>
> This tutorial manages wll the problem. However, I need to where where the
> user has clicked not just based in rectangles, like here, but on rectangle
> or ellipses that can be rotated, each one at a different rotation.
> In addition, I need to provide some drag&drop functionality for the
> objects inside the design surface.
>
> Thanks


.



Relevant Pages

  • Re: vertical text not drawn at correct location
    ... Your suggestions works in the sample code but not my ... Ian ... Text is suppose to be drawn at a 270 degree ... >> angle and centered in the middle of the rectangle. ...
    (microsoft.public.vc.mfc)
  • JFrame does not refresh after compiling
    ... we have to make a simple program for college with JFrame and JPanel... ... window appears and some lines are drawn, but still there is a problem - when ... since this is a sample code our teacher gave it should work, ...
    (comp.lang.java.help)
  • DIA SDK Issues
    ... I have drawn the conclusion that the DIA SDK is the way to go ... The DIA SDK doesn't seems to not be redistributable. ... machines so I can trace debug information. ... There is no well documented sample code. ...
    (microsoft.public.vsnet.debugging)