?
Solved

Is there no text for CProgressCtrl?

Posted on 1998-03-22
3
Medium Priority
?
792 Views
Last Modified: 2013-11-19
Some documents tell us text of CProgressCtrl.
In the on-line Help, I saw it.
In default processing message, there are WM_GETFONT and WM_SETFONT.
In class library reference, too.
In the first, there is a text below.
"...display, if any, the text..."

How can I display, if any, the text?

Please give me help!
0
Comment
Question by:hotheart
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 0 total points
ID: 1317138
A windows common control progress bar does not display any text.

GetFont and setfont are message that all windows may receive, so the progress bar has to do something sensible with them (BTW: MFC class library doesn't have getfont and setfont).

If you want text on a progress bar, you'll have to draw it yourself by either owner-drawing the progress bar (have to do all the work yourself) or drawing the text over the progress bar (probably in xor mode).

0
 

Author Comment

by:hotheart
ID: 1317139
Of course, I can't display any text.

But On Help, There is a title "Default progress bar message processing".
In other section there is a "Default ... message processing".
Slider control has no WM_GETFONT and WM_SETFONT.

So I think I can display text on "blue block".
Thank for your answer!

0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1317140
That appears to be a documentation error.

The progress control will process these messages (otherwise you'd have to), and if you owner draw the control and try to output text, then I would say that the font you set with WM_SETFONT would be the one that would be used.

But if you let the control draw itself, then you won't get any text.

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month11 days, 12 hours left to enroll

752 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