• 利用BCGControlBar 实现状态条显示Progressbar


    http://www.bcgsoft.com/featuretour/tour144.htm

    Enhanced Status Bar

    The library includes an advanced status bar control, which replaces the standard MFC status bar. It allows you to add animation, text or progress bar to your status bar pane quickly. The status bar comes with the following features:
    • Status bar pane progress bar
    • Status bar pane images, animations and text strings
    • Custom foreground/background pane color (status bar "skin")
    • Mouse events notification (mouse double click handling)
    Sample code:
    CBCGStatusBar   m_wndStatusBar;
    CBitmap         m_bmpStatusBarIcon;

    static UINT indicators[] =
    {
        ID_INDICATOR_ICON,      // status icon
        ID_SEPARATOR,           // status line indicator
        ID_INDICATOR_PROGRESS,  // progress bar
        ID_INDICATOR_LABEL,     // text label
        ID_INDICATOR_ANIMATION, // animation pane
        ID_INDICATOR_CAPS,
        ID_INDICATOR_NUM,
        ID_INDICATOR_SCRL,
    };

    int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
    {
        ...

        // Create status bar control:
        if (!m_wndStatusBar.Create(this) ||
            !m_wndStatusBar.SetIndicators(indicators,
              sizeof(indicators)/sizeof(UINT)))
        {
            TRACE0("Failed to create status bar\n");
            return -1;      // fail to create
        }

        // Set pane image:
        m_bmpStatusBarIcon.LoadBitmap (IDB_STATUS);
        m_wndStatusBar.SetPaneIcon (0, m_bmpStatusBarIcon);

        // Set pane progress:
        m_wndStatusBar.EnablePaneProgressBar (1, PROGRESS_MAX);
    }

    void CMainFrame::OnTimer (UINT nIDEvent)
    {
        m_wndStatusBar.SetPaneProgress (1, m_nProgressCurr);
    }
  • 相关阅读:
    Linux-安装FFmpeg
    博客园添加视频
    博客园添加音乐
    通过容器提交镜像(docker commit)以及推送镜像(docker push)笔记
    根据不同配置.env获取不同的配置文件的配置
    1M大概多少个字
    计算机存储单位
    DNS原理及其解析过程
    查看到百度经过了多少个网关
    C语言的本质(18)——函数的可变参数
  • 原文地址:https://www.cnblogs.com/cy163/p/1671587.html
Copyright © 2020-2023  润新知