Progress Control with Text
原文链接:http://www.codeproject.com/Articles/80/Progress-Control-with-Text
重写的Progress 包括,设置bar前景背景颜色,设置文本前景背景颜色,设置文本的前中后显示,设置进度动画。
void SetShowText(BOOL bShow);// Specifies whether or not the text for the control will be displayed during updates
COLORREF SetBarColor(COLORREF crBarClr = CLR_DEFAULT);// Specifies the colour of the progress control bar, and returns the previous colour. If the colour is set as CLR_DEFAULT then the Windows default colour is used.
COLORREF GetBarColor();// Returns the colour of the progress control bar, or CLR_DEFAULT if the default Windows colours are being used.
COLORREF SetBarBkColor(COLORREF crBarClr = CLR_DEFAULT);// Specifies the colour for the control's background, and returns the previous background colour. If the colour is set as CLR_DEFAULT then the Windows default colour is used.
COLORREF GetBarBkColor();// Returns the colour of the control's background, or CLR_DEFAULT if the default Windows colours are being used.
COLORREF SetTextColor(COLORREF crBarClr = CLR_DEFAULT);// Specifies the colour of the text, and returns the previous colour. If the colour is set as CLR_DEFAULT then the Windows default colour is used.
COLORREF GetTextColor();// Returns the colour of the text, or CLR_DEFAULT if the default Windows colours are being used.
COLORREF SetTextBkColor(COLORREF crBarClr = CLR_DEFAULT);// Specifies the background colour of the text, and returns the previous background colour. If the colour is set as CLR_DEFAULT then the Windows default colour is used.
COLORREF GetTextBkColor();// Returns the background colour of the text, or CLR_DEFAULT if the default Windows colours are being used.
BOOL SetShowPercent(BOOL bShow)// Sets whether or not to show the percentage value of the bar, and returns the old value
DWORD AlignText(DWORD dwAlignment = DT_CENTER)// Sets the text alignment and returns the old value
BOOL SetMarquee(BOOL bOn, UINT uMsecBetweenUpdate)// Sets whether or not the progress control is in marquee mode, as well as the interval in milliseconds between steps of the marquee block
int SetMarqueeOptions(int nBarSize)// Sets the size of the marquee as a percentage of the total control width
设置文本
CWnd::SetWindowText
运行结果如下:

代码下载地址:http://download.csdn.net/detail/wuyuan2011woaini/9594241
Progress Control with Text的更多相关文章
- Overview of Form Control Types [AX 2012]
Overview of Form Control Types [AX 2012] Other Versions 0 out of 1 rated this helpful - Rate this to ...
- [转帖]Introduction to text manipulation on UNIX-based systems
Introduction to text manipulation on UNIX-based systems https://www.ibm.com/developerworks/aix/libra ...
- System.Windows.Forms.Control : Component, IOleControl, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject....
#region 程序集 System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ...
- C#自定义MessageBox 按钮的Text
运行效果: 代码: using System; using System.Drawing; using System.Runtime.InteropServices; using System.Tex ...
- sublime text 3搭建python 的ide
感谢大佬-->原文链接 1. 打开Sublime text 3 安装package control Sublime Text 3 安装Package Control 2. 安装 SublimeR ...
- How to remove focus without setting focus to another control?
How to remove focus without setting focus to another control? Ask Question up vote 67 down vote favo ...
- ios项目里扒出来的json文件
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #000000 } p.p2 { margin: 0.0px 0. ...
- 2013 duilib入门简明教程 -- 复杂控件介绍 (13)
首先将本节要介绍的控件全部拖到界面上,并调整好位置,如图: 然后将Name属性改成其他名字, 不能是[控件名+UI+数字]这种,因为这是DuiDesigner ...
- Github上关于iOS的各种开源项目集合(强烈建议大家收藏,查看,总有一款你需要)
下拉刷新 EGOTableViewPullRefresh - 最早的下拉刷新控件. SVPullToRefresh - 下拉刷新控件. MJRefresh - 仅需一行代码就可以为UITableVie ...
随机推荐
- Weblogic魔法堂:AdminServer.lok被锁导致启动、关闭域失败
一.判断AdminServer.lok被其进程锁死 >weblogic.management.ManagementException: Unable to obtain lock on **** ...
- Oracle级联查询
在ORACLE 数据库中有一种方法可以实现级联查询 select * //要查询的字段 from table //具有子接点ID与父接点I ...
- 【jQuery基础学习】11 jQuery性能简单优化
关于性能优化 合适的选择器 $("#id")会直接调用底层方法,所以这是最快的.如果这样不能直接找到,也可以用find方法继续查找 $("p")标签选择器也是直 ...
- javascript: detect mobile devices or browser
http://detectmobilebrowsers.com/ http://hgoebl.github.io/mobile-detect.js/ http://www.hand-interacti ...
- MySQL常用SQL语句
一.数据库操作 1.创建数据库: Mysql> CREATE DATABASE databaseName; Mysql数据库的数据文件默认存放在/usr/local/mysql/var/目录下, ...
- 【Effective Java】2、构造参数过多的时候
package cn.xf.cp.ch02.item2; /** * * 功能:当我们的构造参数有很多,超出可控范围的时候,用build模式 时间:下午8:25:05 文件:NutritionFact ...
- Java的集合框架
01.为什么要使用集合框架? 解析:如果并不知道程序运行时会需要多少对象,或者需要更复杂方式存储对象,那么可以使用Java集合框架. 如果启用集合的删除方法,那么集合中所有元素的索引会自动维护. 集合 ...
- ASP.NET WebAPI 10 Action的选择(二)
在本系列的第二篇简要的讲述了Action的选择条件本篇深入讲述一下Action选择的过程在上一篇中我们已经讲到了Controller的激活过程中已经说到了设置Controller的Controller ...
- XPM转换与查看工具
X PixMap (XPM)是一种基于ASCII编码的图像格式,在X Window系统中的应用十分广泛.她最初由位于法国Sophia Antipolis的Bull研究中心的Daniel Dardail ...
- H5前端面试题及答案(1)
前几天去面试了一家公司,整下改公司的面试题. 1.新的 HTML5 文档类型和字符集是? HTML5 文档类型很简单: <!doctype html> HTML5 使用 UTF-8 编码示 ...