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

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