Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » RectTracker filled with black
Re: RectTracker filled with black [message #14532 is a reply to message #14517] Fri, 29 February 2008 15:08 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1427
Registered: September 2007
Ultimate Contributor
cbpporter wrote on Thu, 28 February 2008 12:12


OK, I'm giving up on RectTracker and doing it manually with mouse events and GetCapture(). I just can't get it to behave as as want it.


OK, I seems that U++ is having an undesired effect on me. I can no longer choose the easy way so easily Smile. I was writing my manual code, and even though it was easy and worked fine, I felt it as highly redundant since there was already that RectTracker class.
So I sat down and managed to adapt it to my needs. I'm not posting the result, because I think it is not that general, it is more suited for graphics applications with precise cursor interaction, and also you have to adjust the coordinates returned by Track a little.

But there are still a couple of thing I would like to note:
1. I used ViewDraw and strangely, the drawings remain on my form even after it got covered by other windows. Does ViewDraw feature any cache or backbuffer?

2. In the code proposed by mrjt, I have found that the InflateVert(1) and InflateHorz(1) introduce a 1 pixel imprecision between mouse cursor, rect coordinates and visual representation of the drawn drag rect.

I have added include the test case I use to test coordinates.
  • Attachment: RectTest.rar
    (Size: 1.45KB, Downloaded 423 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How can I use RectTracker in a rubber-band like operation?
Next Topic: [Bug] Windows UI Refresh Missed.
Goto Forum:
  


Current Time: Mon May 12 01:05:38 CEST 2025

Total time taken to generate the page: 0.00553 seconds