Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.5 KiB

  1. // AInfodlg.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "evtview.h"
  5. #include "AInfodlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CScheduleActionInfo dialog
  13. CScheduleActionInfo::CScheduleActionInfo(CWnd* pParent /*=NULL*/)
  14. : CDialog(CScheduleActionInfo::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(CScheduleActionInfo)
  17. m_stParam = _T("");
  18. //}}AFX_DATA_INIT
  19. }
  20. void CScheduleActionInfo::DoDataExchange(CDataExchange* pDX)
  21. {
  22. CDialog::DoDataExchange(pDX);
  23. //{{AFX_DATA_MAP(CScheduleActionInfo)
  24. DDX_Control(pDX, IDC_TYPE, m_ctrlType);
  25. DDX_Text(pDX, IDC_PARAM, m_stParam);
  26. //}}AFX_DATA_MAP
  27. }
  28. BEGIN_MESSAGE_MAP(CScheduleActionInfo, CDialog)
  29. //{{AFX_MSG_MAP(CScheduleActionInfo)
  30. //}}AFX_MSG_MAP
  31. END_MESSAGE_MAP()
  32. /////////////////////////////////////////////////////////////////////////////
  33. // CScheduleActionInfo message handlers
  34. BOOL CScheduleActionInfo::OnInitDialog()
  35. {
  36. CDialog::OnInitDialog();
  37. int i =0 ;
  38. while (aAction [i].pszDesc)
  39. {
  40. m_ctrlType.AddString (aAction [i].pszDesc) ;
  41. m_ctrlType.SetItemData (i, aAction [i].dwCode) ;
  42. i++ ;
  43. } ;
  44. if (i)
  45. m_ctrlType.SetCurSel (0) ;
  46. return TRUE; // return TRUE unless you set the focus to a control
  47. // EXCEPTION: OCX Property Pages should return FALSE
  48. }
  49. void CScheduleActionInfo::OnOK()
  50. {
  51. UpdateData(TRUE) ;
  52. sActionInfo.dwActionType = m_ctrlType.GetItemData (m_ctrlType.GetCurSel()) ;
  53. sActionInfo.stParam = m_stParam ;
  54. CDialog::OnOK();
  55. }