CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Location
    Islamabad,Pakistan
    Posts
    71

    capturing mouse events for self created figures

    Hi to all,

    I have a problem

    I am drawing figures like ellipses, rectangles....

    And i want to know when they are clicked

    I know that i ll have to use delegates and events

    even i had tried these

    but i am not able to get these in fact..... i know the basics of events and delegates means that how they actullay work....

    I am looking for an urgent help

    Thanks

  2. #2
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: capturing mouse events for self created figures

    These figures must be drawn onto a control right ?

    Handle the mouse down event on that control. The parameters passed into this event contain the cursor position. Run through the bounding boxes of your figures and check which one has been clicked on.

    Straightforward huh ?

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured