Cannot Make Static Text Appear in Dialog

Usage:
VC++ 5.0
Windows NT

I have a regular MFC DLL that includes a Dialog box created using the Resource Editor.
Two Controls, static text and a progress bar are by default not displayed until the user hits OK.

I have them appear by simply calling
m_Progress.ShowWindow(SW_SHOW);
m_Static.ShowWindow(SW_SHOW);

For some reason ONLY the progress bar appears and the static text does not.

As a debugging exercise I created a button that 'shows' and 'hides' both controls. It works perfect!!!!! for both controls.

Does anyone have any idea why and under what circumstances a 'Static Text' control will NOT appear after issuing the ShowWindow() command ?

TX in advance.
shark351Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

shark351Author Commented:
Edited text of question.
0
chensuCommented:
Try

m_Static.ShowWindow(SW_SHOW);
m_Static.Invalidate();
m_Static.UpdateWindow();
0
Vinayak KumbarSr Program ManagerCommented:
Hi,

Try putting the text once again by using SetWindowText() function.

VinExpert
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

shark351Author Commented:
Thanks for the suggestions.
Unfortunately I won't be able to try them until I get back to work on Monday. It seems to be a very unusual problem that I cannot re-create in my other projects.
0
x1riderCommented:
Yes, you have to

ShowWindow()
 AND
SetWindowText()
0
Vinayak KumbarSr Program ManagerCommented:
!!!!!!!?

VinExpert
0
shark351Author Commented:
To be fair to Chensu and Vinexpert I am rejecting the answer since they have already proposed solutions.
As posted earlier I will try the solutions Monday 3rd and get back to you.
Could any of you tell me if this is a common problem. It still seems very unusual to me that a 'control' would not react to the ShowWindow() function.
Have any of you come across this before?
0
chensuCommented:
Unusual.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vinayak KumbarSr Program ManagerCommented:
Hi,

I faced the same problem while I was creating a wait dialog box. The text "please wait..." was never displayed. So I did SetWindowText(...) once again to solve that problem.

VinExpert
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.