Weird problem - buttons without caption...

Posted on 2006-11-25
Last Modified: 2010-04-05
I am experiencing the weirdest thing I ever encountered in Delphi... and so far I cannot explain it. And also I cannot solve it.

Some components (usual ones like CheckBox, ComboBox, Buttons, MessageBoxes) seem to have their caption invisible. So the text is there because I can see the surrounding dotted rectangle around it when they receive focus. Also for Comboboxes, they dropdown in the list and the list is as long as it should be but there is no text there... if I browse through it and select one of it's invisible items... the combobox shows me the text that was supposed to be in the dropdown list.
Also some ShowMessage boxes do not have the message body, and neither the buttons on the showmessage box. So the ShowMessage and MessageDlg... shows me a form with no text on it, and 1 or 2 buttons (Ok Cancel) but the buttons have no text on them . Everything on the standard ShowMessage and MessageDlg is empty.

The interesting thing is that I have to very similar forms that contain almost the same components (anyway the same component types like Edits, ComboBoxes... and so on), so there are no other types of components on them. And one of the forms works like a charm, the other gives me headackes.
The most interesting thing is that this behavior only seems to appear on certain computers. On my own ones they work great. But on one of my client's computers (3 computers) don't.

At first I thought maybe it's something wrong in the registry... but if it were, then all the forms that have MessageDlg and ShowMessage , Checkboxes and Comboboxes on them should have the same problem, but they don't.

Another thing: On these two particular forms that are 98% identical (the one that works and the other that doesn't) half of the components are created in design time and the other half are created on runtime.
Also another thing is that on both of them I use standard Delphi VCL components plus a Jedi component called jvScrollMax (where I create on runtime some components). But since I do almost the same steps in both forms I don't think that this component is to blame.

So this is probabely something internal in Delphi, but I cann't figure it out.
Any ideeas?

Question by:calinutz
LVL 11

Author Comment

ID: 18012536
And yes... I free all my runtime created components if anyone asks..
LVL 11

Author Comment

ID: 18012554
Also weird... (that makes me think it's something wrong with the registry) is that another application from my applications pack sent to the same client started to behave similarly. I mean, there is no jvScrollMax component in that application, and still some checkboxes, and Buttons on some forms do not have Captions on them.
LVL 28

Expert Comment

ID: 18012618
well, first thing is first: the application works perfectly just that the text is not displayed, right? in this case try to make a small application that send a WM_gettext message to one of thos components (must have handle) and see if it gets anything (this app will be run by your client. something like winspy, if you can make your client use that correctly to get you teh information. but safest is to just make this small app :) )
this will tell you if there is a problem displaying or there is no text there ;)
second: showmessage and messagedlg do not have text???? I find it hard to believe since those are standard windows controls. delphi just creates some kind of wrapper on them.
so question is: are there some "weird" applications in the clients machine?
they didn't by any chance upgrade to vista, did they? (since one of your clients "started" having the issue, makes me think something changed in their environment, and the OS is first in my mind)

then comes fird: are you using some sort of components for skinning? or anything that changes the UI/appearence? hooking maybe? localization (as in translations)?
consider this scenario:
- application wants to display something, so it makes the call
- this call is being intermediated by "something" (skinning module, translation module, whatever)
- the modules bailes out for some reason and since it's badly written, the call is forgot
- the application doesn't get the response so there is nothing to display

I am thinking of the translation/skinning part. am I close? :D
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.


Accepted Solution

Ghitza earned 500 total points
ID: 18012748
Do you use by any chance an exe packer called RLPack (basic edition)?
I had a similar behaviour after packing my executables with this one. If so, then try packing them with something else... like UPX or something.
RLPack is very strong but seems to count on some resources that are local or something like that... and when you deploy the app the named resources are just not there with your app.

Best regards

Expert Comment

ID: 18013076
I've seen this kind of thing with custom colors.  If you're using custom colors, try using the standard clWindowText for the font color, and see if the text shows up.  If it does, than some security crazed nut has locked the end user out of using custom colors, and the user profile needs to be fixed.
LVL 11

Author Comment

ID: 18014177
ciuly -- I do not use theming nor skinning and yes the error appears even for windows standard controls.
ghitza -- yours is the right guess (merci) I actually was using the RLPack (silly mistake)
Meldrachaun -- I thought of custom colors from the start but it wasn't that (I wasn't using any custom colors (just the standard ones) and I even tested it with changed colors for the captions with the same result)

Thanks to all
LVL 11

Author Comment

ID: 18014180
I notified the RLPack team about this bug, so hopefully no one else will encounter this problem

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question