資源簡介
在VC中也有進度條的控件,但它不能顯示文字。今有一CProgressCtrl類的派生類CTextProgressCtrl就有完成這樣的工作。

代碼片段和文件信息
//?ProgressDemo.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“ProgressDemo.h“
#include?“ProgressDemoDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CProgressDemoApp
BEGIN_MESSAGE_MAP(CProgressDemoApp?CWinApp)
//{{AFX_MSG_MAP(CProgressDemoApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CProgressDemoApp?construction
CProgressDemoApp::CProgressDemoApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CProgressDemoApp?object
CProgressDemoApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CProgressDemoApp?initialization
BOOL?CProgressDemoApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CProgressDemoDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????110731??2014-05-08?09:21??ProgressDemo\Debug\ProgressDemo.exe
?????文件?????286612??2014-05-08?09:21??ProgressDemo\Debug\ProgressDemo.ilk
?????文件??????15009??2014-04-12?11:08??ProgressDemo\Debug\ProgressDemo.obj
?????文件????5494584??2014-04-12?11:08??ProgressDemo\Debug\ProgressDemo.pch
?????文件?????410624??2014-05-08?09:21??ProgressDemo\Debug\ProgressDemo.pdb
?????文件???????2736??2014-04-12?11:28??ProgressDemo\Debug\ProgressDemo.res
?????文件??????26909??2014-04-12?11:08??ProgressDemo\Debug\ProgressDemoDlg.obj
?????文件?????106199??2014-04-12?11:08??ProgressDemo\Debug\StdAfx.obj
?????文件??????36621??2014-05-08?09:21??ProgressDemo\Debug\TextProgressCtrl.obj
?????文件?????214016??2014-05-08?09:21??ProgressDemo\Debug\vc60.idb
?????文件?????364544??2014-05-08?09:21??ProgressDemo\Debug\vc60.pdb
?????文件??????21368??2014-04-18?21:36??ProgressDemo\ProgressDemo.aps
?????文件???????1271??2014-05-08?09:19??ProgressDemo\ProgressDemo.clw
?????文件???????2147??2003-05-07?22:40??ProgressDemo\ProgressDemo.cpp
?????文件???????4411??2003-05-07?23:34??ProgressDemo\ProgressDemo.dsp
?????文件????????547??2003-05-07?22:40??ProgressDemo\ProgressDemo.dsw
?????文件???????1390??2003-05-07?22:40??ProgressDemo\ProgressDemo.h
?????文件??????54784??2014-05-07?23:00??ProgressDemo\ProgressDemo.opt
?????文件???????1237??2014-05-08?09:21??ProgressDemo\ProgressDemo.plg
?????文件???????5530??2014-04-12?11:28??ProgressDemo\ProgressDemo.rc
?????文件???????4638??2003-05-07?23:16??ProgressDemo\ProgressDemoDlg.cpp
?????文件???????1484??2003-05-07?23:15??ProgressDemo\ProgressDemoDlg.h
?????文件???????1078??2003-05-07?22:40??ProgressDemo\res\ProgressDemo.ico
?????文件????????404??2003-05-07?22:40??ProgressDemo\res\ProgressDemo.rc2
?????文件????????736??2003-05-07?23:16??ProgressDemo\Resource.h
?????文件????????214??2003-05-07?22:40??ProgressDemo\StdAfx.cpp
?????文件???????1054??2003-05-07?22:40??ProgressDemo\StdAfx.h
?????文件???????8929??2014-05-07?23:00??ProgressDemo\TextProgressCtrl.cpp
?????文件???????2414??2003-05-07?23:16??ProgressDemo\TextProgressCtrl.h
?????目錄??????????0??2014-05-08?09:21??ProgressDemo\Debug
............此處省略5個文件信息
評論
共有 條評論