中间件标准版5.1git,去除基础模块

DialogProgress.cpp 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // DialogProgress.cpp : 实现文件
  2. //
  3. #include "stdafx.h"
  4. #include "FirstStep.h"
  5. #include "DialogProgress.h"
  6. #include "afxdialogex.h"
  7. // CDialogProgress 对话框
  8. IMPLEMENT_DYNAMIC(CDialogProgress, CDialogEx)
  9. CDialogProgress::CDialogProgress(CWnd* pParent /*=NULL*/)
  10. : CDialogEx(CDialogProgress::IDD, pParent)
  11. {
  12. }
  13. CDialogProgress::~CDialogProgress()
  14. {
  15. }
  16. void CDialogProgress::DoDataExchange(CDataExchange* pDX)
  17. {
  18. CDialogEx::DoDataExchange(pDX);
  19. DDX_Control(pDX, IDC_PROGRESS, m_ProgressCtrl);
  20. }
  21. BEGIN_MESSAGE_MAP(CDialogProgress, CDialogEx)
  22. END_MESSAGE_MAP()
  23. // CDialogProgress 消息处理程序
  24. BOOL CDialogProgress::PreTranslateMessage(MSG* pMsg)
  25. {
  26. // TODO: 在此添加专用代码和/或调用基类
  27. if((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_ESCAPE || pMsg->wParam == VK_RETURN))
  28. return TRUE;
  29. return CDialogEx::PreTranslateMessage(pMsg);
  30. }
  31. /*****************************************************************
  32. **【函数名称】 setProgressRange
  33. **【函数功能】 设置进度条范围
  34. **【参数】
  35. **【返回值】
  36. ****************************************************************/
  37. void CDialogProgress::setProgressRange( int Range )
  38. {
  39. m_ProgressCtrl.SetRange(0, Range);
  40. }
  41. /*****************************************************************
  42. **【函数名称】 setProgressPos
  43. **【函数功能】 设置进度条位置
  44. **【参数】
  45. **【返回值】
  46. ****************************************************************/
  47. void CDialogProgress::setProgressPos( int Pos )
  48. {
  49. m_ProgressCtrl.SetPos(Pos);
  50. }
  51. /*****************************************************************
  52. **【函数名称】 setHint
  53. **【函数功能】 设置提示内容
  54. **【参数】
  55. **【返回值】
  56. ****************************************************************/
  57. void CDialogProgress::setHint( const CString& Hint )
  58. {
  59. SetDlgItemText(IDC_STATIC_HINT, Hint);
  60. }