CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Posts
    788

    highlight screen area as mouse hold down and drag over

    when i press left mouse button down and drag it over any screen area, i want to highlight this area with color, until i release my left mouse button. and of course, i only want this to be temporary,i.e as soon as i click my mouse elsewhere, the highlighted area is gone.

    now my problem is highlighting the screen area. i can get the mouse curr position, then what message should i overide and how to in order to highlight the area as my mouse drag over it?? i appreciate a simple sample codes.. preferably with win32

  2. #2
    Join Date
    Jul 2003
    Posts
    116
    when u get the mouse over a control, grab its handle by WindowFromPoint()
    take its rect by using GetWindowRect()
    draw a rectangle in that area with any color for a while, remove the rect, and redraw again remove again... repeat this as long as u want.

  3. #3
    Join Date
    Jul 2003
    Posts
    116
    check this and the references in this article this will give you a more clear picture.
    hope this helps

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