CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Click N Drag

  1. #1
    Join Date
    Mar 2010
    Location
    Melbourne Australia
    Posts
    454

    Click N Drag

    hello all , which API to use to find out , when user has click and drag in region of the screen , return a rectangle or a call back function to return the x ,y coordinates .

  2. #2
    Join Date
    Oct 2010
    Posts
    68

    Re: Click N Drag

    Quote Originally Posted by aamir121a View Post
    hello all , which API to use to find out , when user has click and drag in region of the screen , return a rectangle or a call back function to return the x ,y coordinates .

    Well using Win32 API your window will receive WM_LBUTTONDOWN and WM_LBUTTONUP messages. If the user clicks and drags then these two messages will have different coords. You could write a custom function to create the RECT using those coords.

    I don't know of anyhting that does this...but that doesn't mean much

  3. #3
    Join Date
    Jan 2009
    Posts
    54

    Re: Click N Drag

    How to draw a rubber band rectangle or a focus rectangle in Visual C#

    http://support.microsoft.com/kb/314945
    Even though the code is for C# it is actually nearly identical to the C/C++ code just the event handlers are done in a different way.

  4. #4
    Join Date
    Mar 2010
    Location
    Melbourne Australia
    Posts
    454

    Re: Click N Drag

    thank you all

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