From: Tom Shelton on
On 2010-03-18, Bob S <BobS(a)discussions.microsoft.com> wrote:
> I am looking at a project which will require me to venture into some
> new territory. I have been searching the net and appear to have not
> hit on the correct keywords to find what I am looking for.
>
> I need to write an application which draws objects on a canvas, but I need
> the objects to remain objects so they could be moved around. Basically the
> same sort of functionality found in Visual Studio Design mode where I can
> pull a button out of the toolbox and after it has been placed, move it to
> somewhere else.
>
> Looking at the generated code, I see how buttons are created and positioned
> and I suppose that trapping mouse down on the button and then looking at
> motion events could allow me to move the object around. I suspect that there
> is
> support for doing that somewhere, but I have not found the correct set of
> keywords to hit on it. Most of the stuff I have found on GDI objects and
> graphics objects have dealt which drawing things on a canvas and then
> "there they are there they stay".
>
> Any pointers on where to look would be appreciated.
>
> If I have not provided enough detail on what I am attempting to accomplish,
> this application will be simliar to a gant chart program. The data objects
> will
> be generated from data with size being related to duration and coloration
> being
> related to the type of activity. These objects will be moved to one or more
> timelines. Assorted cross checking will be done when the object is placed.
> Snap to grid type granularity would also be nice.
>
> Thank you for your time.
>

Chris pointed you to an article that explained a bit about creating your own
retained mode graphics system around GDI/GDI+.

Might I point out though, that WPF already is a retained mode graphics system?
Hittesting, etc, etc, already built in... Just another alternative.

--
Tom Shelton