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.

80 lines
2.2 KiB

  1. // OpenQDlg.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 "OpenQDlg.h"
  14. #ifdef _DEBUG
  15. #define new DEBUG_NEW
  16. #undef THIS_FILE
  17. static char THIS_FILE[] = __FILE__;
  18. #endif
  19. /////////////////////////////////////////////////////////////////////////////
  20. // COpenQueueDialog dialog
  21. COpenQueueDialog::COpenQueueDialog(CArray <ARRAYQ*, ARRAYQ*>* pStrArray, CWnd* pParent /*=NULL*/)
  22. : CDialog(COpenQueueDialog::IDD, pParent)
  23. {
  24. m_pStrArray = pStrArray;
  25. //{{AFX_DATA_INIT(COpenQueueDialog)
  26. m_bReceiveAccessFlag = FALSE;
  27. m_bPeekAccessFlag = FALSE;
  28. m_SendAccessFlag = FALSE;
  29. m_szPathName = _T("");
  30. //}}AFX_DATA_INIT
  31. }
  32. void COpenQueueDialog::DoDataExchange(CDataExchange* pDX)
  33. {
  34. CDialog::DoDataExchange(pDX);
  35. //{{AFX_DATA_MAP(COpenQueueDialog)
  36. DDX_Control(pDX, IDC_PATHNAME_COMBO, m_PathNameCB);
  37. DDX_Check(pDX, IDC_IDC_MQ_RECEIVE_ACCESS, m_bReceiveAccessFlag);
  38. DDX_Check(pDX, IDC_MQ_PEEK_ACCESS, m_bPeekAccessFlag);
  39. DDX_Check(pDX, IDC_MQ_SEND_ACCESS, m_SendAccessFlag);
  40. DDX_CBString(pDX, IDC_PATHNAME_COMBO, m_szPathName);
  41. DDV_MaxChars(pDX, m_szPathName, 128);
  42. //}}AFX_DATA_MAP
  43. }
  44. BEGIN_MESSAGE_MAP(COpenQueueDialog, CDialog)
  45. //{{AFX_MSG_MAP(COpenQueueDialog)
  46. //}}AFX_MSG_MAP
  47. END_MESSAGE_MAP()
  48. /////////////////////////////////////////////////////////////////////////////
  49. // COpenQueueDialog message handlers
  50. BOOL COpenQueueDialog::OnInitDialog()
  51. {
  52. CDialog::OnInitDialog();
  53. // TODO: Add extra initialization here
  54. int i;
  55. for (i=0 ; i<m_pStrArray->GetSize() ; i++)
  56. VERIFY (m_PathNameCB.AddString((*m_pStrArray)[i]->szPathName) != CB_ERR);
  57. if (m_PathNameCB.GetCount() > 0) m_PathNameCB.SetCurSel(0);
  58. return TRUE; // return TRUE unless you set the focus to a control
  59. // EXCEPTION: OCX Property Pages should return FALSE
  60. }