VC ++ MFC progress control progress bar

Source: Internet
Author: User

1. Common functions

Setrange (0,100) sets the range;

Setstep (int I) sets the step size;

Stepit (); increment the progress in one step;

Int setpos (INT NPOs) sets the current position, which can be used for initialization;

Int getpos () to get the current progress;

2. Set the control progress control variable.

3.

M_progressfile.setpos (0); // initialization progress bar Int J = 0; For (INT I = 0; I <ISEL; I ++) {int ik = m_listfiles.getcheck (I ); if (m_listfiles.getcheck (I) = 1) {J ++;
} M_progressfile.setrange (0, J); // progress bar range m_progressfile.setstep (1); // step for (INT I = 0; I <ISEL; I ++) {int ik = m_listfiles.getcheck (I); If (m_listfiles.getcheck (I) = 1) {m_listfiles.gettext (I, strfilename); readcodefile (strfilepath + "\" + strfilename, strpath + "\" + strfilename); m_progressfile.stepit (); // incremental progress in one step }}

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.