Page 2 of 2

Re: Strange graphics bug

Posted: 08 Oct 2013, 20:44
by TiKu
That's why I wrote that I do not like this solution... I'll search for another solution. :(

Re: Strange graphics bug

Posted: 08 Oct 2013, 22:09
by TiKu
God, sometimes I want to kill somebody at Microsoft. :twisted:
The COM interfaces for windowless controls provide two methods for triggering a redraw cycle: InvalidateRect and InvalidateRgn. According to the docs, the only difference between them is that one of them invalidates a rectangular area while the other invalidates a GDI region. According to the docs both of them can be used to invalidate the entire control area by passing NULL instead of a rectangle or a region.
Well, ATL uses InvalidateRect internally and I also tried it myself last week when I tried to fix the drawing issues. But InvalidateRect doesn't work. It is somehow broken. It won't erase the background of the control even if you tell it to do so. As, according to the docs, InvalidateRgn isn't really different from InvalidateRect, I didn't bother giving it a try. Well, I should have done, as it works like a charme.
So I could remove my hackish solution (calling the container control's Refresh method) again and replace it with a one-liner which calls InvalidateRgn. ARGH!

Please try this version and tell me whether it works:
http://www.timosoft-software.de/stuff/l ... 72-rel.zip
http://www.timosoft-software.de/stuff/L ... elease.exe

Re: Strange graphics bug

Posted: 09 Oct 2013, 10:49
by baron
Looking great on my tests so far. It even fixed this new label refresh issue that I was trying to reproduce and report to you. Thanks!

I don't think I've ever used Microsoft API or programmed an addon in a Microsoft environment without regretting it. Their complexities, quirks and bugs know no bounds. Except VB6 itself that is.