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.

84 lines
2.3 KiB

  1. // RecvMDlg.cpp : implementation file
  2. //
  3. //=--------------------------------------------------------------------------=
  4. // Copyright 1997-1999 Microsoft Corporation. All Rights Reserved.
  5. //
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  7. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  8. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  9. // PARTICULAR PURPOSE.
  10. //=--------------------------------------------------------------------------=
  11. #include "stdafx.h"
  12. #include "MQApitst.h"
  13. #include "RecvMDlg.h"
  14. #ifdef _DEBUG
  15. #define new DEBUG_NEW
  16. #undef THIS_FILE
  17. static char THIS_FILE[] = __FILE__;
  18. #endif
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CReceiveMessageDialog dialog
  21. CReceiveMessageDialog::CReceiveMessageDialog(CArray <ARRAYQ*, ARRAYQ*>* pStrArray, CWnd* pParent /*=NULL*/)
  22. : CDialog(CReceiveMessageDialog::IDD, pParent)
  23. {
  24. m_pStrArray = pStrArray;
  25. //{{AFX_DATA_INIT(CReceiveMessageDialog)
  26. m_szPathName = _T("");
  27. m_iTimeout = 20000;
  28. m_dwBodySize = BUFFERSIZE;
  29. //}}AFX_DATA_INIT
  30. }
  31. void CReceiveMessageDialog::DoDataExchange(CDataExchange* pDX)
  32. {
  33. CDialog::DoDataExchange(pDX);
  34. //{{AFX_DATA_MAP(CReceiveMessageDialog)
  35. DDX_Control(pDX, IDC_COMBO, m_PathNameCB);
  36. DDX_CBString(pDX, IDC_COMBO, m_szPathName);
  37. DDV_MaxChars(pDX, m_szPathName, 128);
  38. DDX_Text(pDX, IDC_TIMEOUT, m_iTimeout);
  39. DDX_Text(pDX, IDC_EDT_BODY_SIZE, m_dwBodySize);
  40. DDV_MinMaxDWord(pDX, m_dwBodySize, 1, 100000000);
  41. //}}AFX_DATA_MAP
  42. }
  43. BEGIN_MESSAGE_MAP(CReceiveMessageDialog, CDialog)
  44. //{{AFX_MSG_MAP(CReceiveMessageDialog)
  45. //}}AFX_MSG_MAP
  46. END_MESSAGE_MAP()
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CReceiveMessageDialog message handlers
  49. BOOL CReceiveMessageDialog::OnInitDialog()
  50. {
  51. CDialog::OnInitDialog();
  52. // TODO: Add extra initialization here
  53. int i;
  54. for (i=0 ; i<m_pStrArray->GetSize() ; i++)
  55. {
  56. if (((*m_pStrArray)[i]->dwAccess & MQ_RECEIVE_ACCESS) != FALSE)
  57. {
  58. VERIFY (m_PathNameCB.AddString((*m_pStrArray)[i]->szPathName) != CB_ERR);
  59. }
  60. }
  61. if (m_PathNameCB.GetCount() > 0) m_PathNameCB.SetCurSel(0);
  62. return TRUE; // return TRUE unless you set the focus to a control
  63. // EXCEPTION: OCX Property Pages should return FALSE
  64. }