Solved

Is there no text for CProgressCtrl?

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

695 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