Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hello all,
 
We started to encounter a bizzare problem with TAdvGlassButton buttons from TMS Software under Delphi2007. Sometimes they simply do not show, and if so, then all of them, across whole application.
 
The point is, that the buttons are there, they react to events (you have to know where they are, thoughSmile | :) ), but do not show.
 
Only the TAdvGlassButton class buttons seem to be a problem, the others like TAdvGlowButton work properly

Restarting the application sometimes helps and sometimes not, and it seems, that it happens mostly on Win XP machines (regularly on WinXP, and sometimes on Win7)
 
The buttons are drawn using GDI+.
 
So far I have done the following:
 
- I did the "overload" test and created a sample app with about 3000 buttons. It worked properly, so it is not a GDI/GDI+ resource problem,
 
- additionally I have checked with Denomo resource leak counter, there are no GDI resource leaks,
 
- I remote debugged the application on target XP from another PC while the bug occurred. I was able to get through the WM_PAINT handler without errors, HDCs were correct, all functions returned no error, but the buttons still did not show,
 
- I was not able to reproduce this error while debugging in IDE (maybe no luck),
 
- if I spoiled the button HDCs intentionally, then they of course do not show, so first my thought was the HDC handles must have been invalid, but my remote debugging test did not prove it,
 
- tried to remove everything from the WM_PAINT and draw only simple rectangle, instead of whole button, still not working,
 
- checked under D2010, but such problem does not occur there (or we did not reveal it yet)
 
- checked the difference between glow button and glass button: glow buttons use double buffering and glass buttons do not use it.
 
- got almost crazy about this bug.
 
My assumptions are so far:
- it may have something to do with double buffering,
- it depends on OS, as we did not see it on Vista
- it must be something very basic, that we simply ignored.
 
My questions:
- what really cause this problem?
- can lack of double buffering result in such a way?
- how to reproduce it systematically?
- can it be some GDI+ DLL incompatibility problem?
- what debugging approach to use to narrow the problem?
- does anybody have encountered similar issue?
 
At the moment I have turned on the double buffering in TAdvGlassButton, we are checking now if it works.
 
Any help appreciated,
 
Best regards,
 
Tomek
Posted 13-Apr-12 6:13am
Misol1349
Comments
smags13 at 4-May-12 0:21am
   
I don't use TMS controls, and I suppose TAdvGlassButton does somehow glass effect. I'm not so sure, but you may want to check transparency settings if there is one. I remember there is a comment in class TCustomForm stating that transparency and glass are mutual exclusive to each other.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Since it is a 3rd party control, you should try their support system first. Here's a link:
http://www.tmssoftware.com/site/login.asp[^]
  Permalink  
Comments
Misol1 at 13-Apr-12 16:41pm
   
Thanks wizardzz, but project owner's subscription there (also including support) has ceased, and it costs about 500 euro to renew. Anyway I will ask the project owner, if he is ready to pay that to report this bug.
Misol1 at 16-Apr-12 8:50am
   
Hi all again,
It seems, that switching on the double buffering has helped,
although I still do not understand why...
 
Tomek

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 13 Apr 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid