home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / msmqocm.cab / recvmdlg.cpp < prev    next >
C/C++ Source or Header  |  1997-10-06  |  2KB  |  75 lines

  1. // RecvMDlg.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "MQApitst.h"
  6. #include "RecvMDlg.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CReceiveMessageDialog dialog
  16.  
  17.  
  18. CReceiveMessageDialog::CReceiveMessageDialog(CArray <ARRAYQ*, ARRAYQ*>* pStrArray, CWnd* pParent /*=NULL*/)
  19.    : CDialog(CReceiveMessageDialog::IDD, pParent)
  20. {
  21.    m_pStrArray = pStrArray;
  22.  
  23.    //{{AFX_DATA_INIT(CReceiveMessageDialog)
  24.    m_szPathName = _T("");
  25.    m_iTimeout = 20000;
  26.     m_dwBodySize = BUFFERSIZE;
  27.     //}}AFX_DATA_INIT
  28. }
  29.  
  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.  
  44.  
  45. BEGIN_MESSAGE_MAP(CReceiveMessageDialog, CDialog)
  46.    //{{AFX_MSG_MAP(CReceiveMessageDialog)
  47.    //}}AFX_MSG_MAP
  48. END_MESSAGE_MAP()
  49.  
  50. /////////////////////////////////////////////////////////////////////////////
  51. // CReceiveMessageDialog message handlers
  52.  
  53. BOOL CReceiveMessageDialog::OnInitDialog()
  54. {
  55.    CDialog::OnInitDialog();
  56.  
  57.    // TODO: Add extra initialization here
  58.  
  59.    int i;
  60.  
  61.    for  (i=0 ; i<m_pStrArray->GetSize() ; i++)
  62.    {
  63.       if (((*m_pStrArray)[i]->dwAccess & MQ_RECEIVE_ACCESS) != FALSE)
  64.       {
  65.          VERIFY (m_PathNameCB.AddString((*m_pStrArray)[i]->szPathName) != CB_ERR);
  66.       }
  67.    }
  68.  
  69.     if (m_PathNameCB.GetCount() > 0) m_PathNameCB.SetCurSel(0);
  70.  
  71.     return TRUE;  // return TRUE unless you set the focus to a control
  72.                  // EXCEPTION: OCX Property Pages should return FALSE
  73. }
  74.  
  75.