[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Cannot Make Static Text Appear in Dialog

Posted on 1999-12-30
9
Medium Priority
?
212 Views
Last Modified: 2013-11-20
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.
0
Comment
Question by:shark351
  • 3
  • 3
  • 2
  • +1
9 Comments
 

Author Comment

by:shark351
ID: 2315024
Edited text of question.
0
 
LVL 23

Expert Comment

by:chensu
ID: 2315349
Try

m_Static.ShowWindow(SW_SHOW);
m_Static.Invalidate();
m_Static.UpdateWindow();
0
 
LVL 8

Expert Comment

by:Vinayak Kumbar
ID: 2316184
Hi,

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

VinExpert
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 

Author Comment

by:shark351
ID: 2316951
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
 

Expert Comment

by:x1rider
ID: 2318062
Yes, you have to

ShowWindow()
 AND
SetWindowText()
0
 
LVL 8

Expert Comment

by:Vinayak Kumbar
ID: 2318345
!!!!!!!?

VinExpert
0
 

Author Comment

by:shark351
ID: 2319283
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
 
LVL 23

Accepted Solution

by:
chensu earned 200 total points
ID: 2319343
Unusual.
0
 
LVL 8

Expert Comment

by:Vinayak Kumbar
ID: 2319419
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month8 days, 21 hours left to enroll

590 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