Solved

Is there no text for CProgressCtrl?

Posted on 1998-03-22
3
737 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now