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 ...
随机推荐
- Qt之QAbstractItemView视图项拖拽(一)
一.需求说明 最近在搞视图项的拖拽,也上网查了一些资料,好多的文档都是一样的,只是被不通的网站所收录了(也有可能是被爬过去的,不明所以),不过也有一些文档写的不错,不过就是太简易,都是点睛之笔,总之功 ...
- 登陆mysql时提示异常的解决方法
[root@host2 ~]# mysql -uroot -p Enter password: ERROR (HY000): Can't connect to local MySQL server t ...
- 快速暴力解决Eclipse ADT和Android Studio兼容问题,创建同时兼容ADT和AS的安卓工程
环境:AS 2.1.2+Java1.7+Gradle 2.14+ADT 24.0.2+MyEclipse 2015 前言:因为比赛要求使用ADT,而我本身比较习惯使用AS开发,遂想办法打造兼容两个ID ...
- Orleans之Hello World
接触Orleans 有一段时间了,之前也翻译了一系列官网文档,今天我们就来一个实际的例子,来看看到底如何用这个东西来开发项目,当然经典的也是醉人的,我们就从HelloWorld开始吧. 通过前面的知识 ...
- MEF核心笔记(6)让 MEF 拥抱 AOP
场景: 最近推荐同事在项目中使用起了 MEF,用其构建一个插件式的多人开发框架,因为该框架不是让我去设计了,所以对于 MEF 和 IOC 等概念不是很了解的同事,便会出现各种问题.接入 AOP 便是其 ...
- CSS3背景渐变属性 linear-gradient(线性渐变)和radial-gradient(径向渐变)
CSS3 Gradient分为linear-gradient(线性渐变)和radial-gradient(径向渐变). 为了更好的应用CSS3 Gradient,我们需要先了解一下目前的几种现代浏览器 ...
- Install gocode
1. D:\AWS_workspace\DAAS_Go>go get -u -ldflags -H=windowsgui github.com/nsf/gocode 2. Then gocode ...
- php中的字符串常用函数(四) ord() 获得字符的ascii码 chr()获取ascii码对应的字符
ord('a');//=>97 返回小写a 的ascii码值97 chr(97);//=>a 返回ascii码表上的97对应的 小写a
- Linux Shell系列教程之(十五) Shell函数简介
本文是Linux Shell系列教程的第(十五)篇,更多Linux Shell教程请看:Linux Shell系列教程 函数可以将一个复杂功能划分成若干模块,从而使程序结构更加清晰,代码重复利用率更高 ...
- 【iOS】Quartz2D绘图路径Path
一.绘图路径 A.简单说明 在画线的时候,方法的内部默认创建一个path.它把路径都放到了path里面去. 1.创建路径 cgmutablepathref 调用该方法相当于创建了一个路径,这个路径用 ...