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.

141 lines
3.1 KiB

  1. // SendMDlg.h : header 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. /////////////////////////////////////////////////////////////////////////////
  12. // CSendMessageDialog dialog
  13. class CSendMessageDialog : public CDialog
  14. {
  15. // Construction
  16. public:
  17. CSendMessageDialog(CArray <ARRAYQ*, ARRAYQ*>*, CWnd* pParent = NULL); // standard constructor
  18. // Dialog Data
  19. //{{AFX_DATA(CSendMessageDialog)
  20. enum { IDD = IDD_SEND_MESSAGE_DIALOG };
  21. CComboBox m_AdminPathNameCB;
  22. CComboBox m_PathNameCB;
  23. CString m_strBody;
  24. CString m_strLabel;
  25. BYTE m_bPriority;
  26. int m_iAck;
  27. int m_iDelivery;
  28. CString m_szPathName;
  29. CString m_szAdminPathName;
  30. BOOL m_Journal;
  31. BOOL m_DeadLetter;
  32. BOOL m_Authenticated;
  33. BOOL m_Encrypted;
  34. long m_dwTimeToReachQueue;
  35. long m_dwTimeToBeReceived;
  36. //}}AFX_DATA
  37. /* pointer to the array with the strings for the combo box (Queues PathName). */
  38. CArray <ARRAYQ*, ARRAYQ*>* m_pStrArray ;
  39. // Overrides
  40. // ClassWizard generated virtual function overrides
  41. //{{AFX_VIRTUAL(CSendMessageDialog)
  42. protected:
  43. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  44. //}}AFX_VIRTUAL
  45. // Implementation
  46. protected:
  47. // Generated message map functions
  48. //{{AFX_MSG(CSendMessageDialog)
  49. virtual BOOL OnInitDialog();
  50. //}}AFX_MSG
  51. DECLARE_MESSAGE_MAP()
  52. public:
  53. void GetPathName(TCHAR szPathName[BUFFERSIZE])
  54. {
  55. _tcscpy (szPathName, m_szPathName);
  56. }
  57. void GetAdminPathName(TCHAR szAdminPathName[BUFFERSIZE])
  58. {
  59. _tcscpy (szAdminPathName, m_szAdminPathName);
  60. }
  61. unsigned char GetDelivery()
  62. {
  63. return (m_iDelivery);
  64. }
  65. unsigned char GetJournal()
  66. {
  67. return (m_Journal);
  68. }
  69. unsigned char GetDeadLetter()
  70. {
  71. return (m_DeadLetter);
  72. }
  73. unsigned char GetAuthenticated()
  74. {
  75. return (m_Authenticated);
  76. }
  77. unsigned char GetEncrypted()
  78. {
  79. return (m_Encrypted);
  80. }
  81. unsigned char GetPriority()
  82. {
  83. return (m_bPriority);
  84. }
  85. unsigned char GetAcknowledge()
  86. {
  87. switch (m_iAck)
  88. {
  89. case 1 : return MQMSG_ACKNOWLEDGMENT_FULL_REACH_QUEUE;
  90. case 2 : return MQMSG_ACKNOWLEDGMENT_FULL_RECEIVE;
  91. case 3 : return MQMSG_ACKNOWLEDGMENT_NACK_REACH_QUEUE;
  92. case 4 : return MQMSG_ACKNOWLEDGMENT_NACK_RECEIVE;
  93. default: return MQMSG_ACKNOWLEDGMENT_NONE;
  94. }
  95. }
  96. void GetMessageBody(TCHAR* pszMessageBodyBuffer)
  97. {
  98. _tcsncpy (pszMessageBodyBuffer, m_strBody, BUFFERSIZE);
  99. }
  100. void GetMessageLabel(TCHAR szMessageLabelBuffer[BUFFERSIZE])
  101. {
  102. _tcsncpy (szMessageLabelBuffer, m_strLabel, BUFFERSIZE);
  103. }
  104. DWORD GetTimeToReachQueue()
  105. {
  106. return (m_dwTimeToReachQueue);
  107. }
  108. DWORD GetTimeToBeReceived()
  109. {
  110. return (m_dwTimeToBeReceived);
  111. }
  112. };
  113. //
  114. // Two buffers to hold the last message label and body.
  115. //
  116. extern TCHAR szLastMessageLabel[BUFFERSIZE];
  117. extern TCHAR szLastMessageBody[BUFFERSIZE];