How to Use the Progress control in VC ++-general Linux technology-Linux programming and kernel information. The Progress control allows people to feel the Progress of an application execution. It can be used in many applications, but it is generally only supported in a single task, in Windows 98/NT Chinese operating system, in the VC ++ 6.0 environment, a very small application program is compiled using threads to implement the use of the Progress control. It supports multiple threads and is easy to use.
The source code of this application is as follows:
// ProgressDialog. h
Class CProgressDialog: public CDialog
{
// Construction
Public:
CProgressDialog (LPCSTR caption, BOOL
EnableCancel = TRUE, CWnd * pParent = NULL );
// Standard constructor
Virtual ~ CProgressDialog (void );
// Dialog Data
// {AFX_DATA (CProgressDialog)
Enum {IDD = IDD_PROGRESS_DIALOG };
CStatic
M_MessageStatic; // process Entry Title
CButton m_CancelButton; // stop button control key
CProgressCtrl
M_ProgressCtrl;
//} AFX_DATA
CString m_Caption;
// Dialog box title
BOOL m_EnableCancel; // the stop button display switch.
BOOL m_IsCancel; // whether to press the stop button
You only need to call the object of the CMyProgressDialog class where the Progress control is applied. You can modify DWORD CMyProgressDialog: ProgressProc () to adapt to the corresponding program.
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