zoukankan      html  css  js  c++  java
  • 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

    运行结果如下:

    image

    代码下载地址:http://download.csdn.net/detail/wuyuan2011woaini/9594241

  • 相关阅读:
    BZOJ2762: [JLOI2011]不等式组
    BZOJ1452: [JSOI2009]Count
    Codeforces Round #441 (Div. 2, by Moscow Team Olympiad)
    BZOJ1635: [Usaco2007 Jan]Tallest Cow 最高的牛
    BZOJ2730: [HNOI2012]矿场搭建
    Flask实现异步非阻塞请求功能
    在flask中使用websocket-实时消息推送
    Python数据库连接池DBUtils
    flask请求上下文
    scanf与getchar
  • 原文地址:https://www.cnblogs.com/wuyuan2011woaini/p/5731863.html
Copyright © 2011-2022 走看看