| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- // DialogProgress.cpp : 实现文件
- //
- #include "stdafx.h"
- #include "FirstStep.h"
- #include "DialogProgress.h"
- #include "afxdialogex.h"
- // CDialogProgress 对话框
- IMPLEMENT_DYNAMIC(CDialogProgress, CDialogEx)
- CDialogProgress::CDialogProgress(CWnd* pParent /*=NULL*/)
- : CDialogEx(CDialogProgress::IDD, pParent)
- {
- }
- CDialogProgress::~CDialogProgress()
- {
- }
- void CDialogProgress::DoDataExchange(CDataExchange* pDX)
- {
- CDialogEx::DoDataExchange(pDX);
- DDX_Control(pDX, IDC_PROGRESS, m_ProgressCtrl);
- }
- BEGIN_MESSAGE_MAP(CDialogProgress, CDialogEx)
- END_MESSAGE_MAP()
- // CDialogProgress 消息处理程序
- BOOL CDialogProgress::PreTranslateMessage(MSG* pMsg)
- {
- // TODO: 在此添加专用代码和/或调用基类
- if((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_ESCAPE || pMsg->wParam == VK_RETURN))
- return TRUE;
- return CDialogEx::PreTranslateMessage(pMsg);
- }
- /*****************************************************************
- **【函数名称】 setProgressRange
- **【函数功能】 设置进度条范围
- **【参数】
- **【返回值】
- ****************************************************************/
- void CDialogProgress::setProgressRange( int Range )
- {
- m_ProgressCtrl.SetRange(0, Range);
- }
- /*****************************************************************
- **【函数名称】 setProgressPos
- **【函数功能】 设置进度条位置
- **【参数】
- **【返回值】
- ****************************************************************/
- void CDialogProgress::setProgressPos( int Pos )
- {
- m_ProgressCtrl.SetPos(Pos);
- }
- /*****************************************************************
- **【函数名称】 setHint
- **【函数功能】 设置提示内容
- **【参数】
- **【返回值】
- ****************************************************************/
- void CDialogProgress::setHint( const CString& Hint )
- {
- SetDlgItemText(IDC_STATIC_HINT, Hint);
- }
|