AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > VC编程

谈VC++中的Progress控件的使用

51自学网 2015-08-30 http://www.wanshiok.com

 

// DDX/DDV support

//}}AFX_VIRTUAL

// Implementation

protected:

// Generated message map functions

//{{AFX_MSG(CProgressDialog)

virtual BOOL OnInitDialog();

virtual void OnCancel();

virtual void OnOK();

//}}AFX_MSG

DECLARE_MESSAGE_MAP()

};

class CMyProgressDialog:public CProgressDialog {

public:

CMyProgressDialog(LPCSTR caption):CProgressDialog(caption) {}

virtual DWORD ProgressProc(); //继承过程

};

// ProgressDialog.cpp

#include "stdafx.h"

#include "ProgressTest.h"

#include "ProgressDialog.h"

#ifdef _DEBUG

#define new DEBUG_NEW

#undef THIS_FILE

static char THIS_FILE[] = __FILE__;

#endif

CProgressDialog::CProgressDialog(LPCSTR caption, BOOL enableCancel, CWnd* pParent /*=NULL*/) :

CDialog(CProgressDialog::IDD, pParent)

{

//{{AFX_DATA_INIT(CProgressDialog)

m_Caption=caption;

m_EnableCancel=enableCancel;

m_IsCancel=FALSE;

m_Thread=NULL;

//}}AFX_DATA_INIT

}

CProgressDialog::~CProgressDialog(void)

{

if (m_Thread) {

CloseHandle(m_Thread);

}

}

 
 
说明
:本教程来源互联网或网友上传或出版商,仅为学习研究或媒体推广,wanshiok.com不保证资料的完整性。

上一篇:如何创建一个不规则形状的窗口  下一篇:VC++环境下浮动工具条的编程