Garmin Fleet Management Controller  2.19.0
CTxtMsgNewDlg.h
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * HEADER NAME:
4 * CTxtMsgNewDlg.h
5 *
6 * Copyright 2008-2009 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #ifndef CTxtMsgNewDlg_H
11 #define CTxtMsgNewDlg_H
12 
13 #include "fmi.h"
14 #include "FmiApplicationLayer.h"
15 
16 //----------------------------------------------------------------------
29 //----------------------------------------------------------------------
30 class CTxtMsgNewDlg : public CDialog
31 {
32  DECLARE_DYNAMIC( CTxtMsgNewDlg )
33  DECLARE_MESSAGE_MAP()
34 
35 public:
37  (
38  CWnd * aParent,
39  FmiApplicationLayer & aCom
40  );
41  virtual ~CTxtMsgNewDlg();
42 
43 protected:
46  typedef int MessageProtocolType;
47 
51  {
52 #if( FMI_SUPPORT_A611 )
55 #endif
56 #if( FMI_SUPPORT_A604 )
59 #endif
60 #if( FMI_SUPPORT_A602 )
64 #endif
65 #if( FMI_SUPPORT_LEGACY )
66  LEGACY_TEXT_MESSAGE_PROTOCOL,
67 #endif
68 
69  MESSAGE_PROTOCOL_CNT // must be last
70  };
71 
72  virtual void DoDataExchange
73  (
74  CDataExchange * aDataExchange
75  );
76  BOOL OnInitDialog();
77  afx_msg void OnEnChangeEditFields();
78  afx_msg void OnCbnSelChangeMsgProtocol();
79  afx_msg void OnBnClickedOk();
80  void updateDlgFields
81  (
82  int aSelectedProtocol
83  );
84 
87 
89  CString mMessageText;
90 
92  MessageProtocolType mMessageProtocol;
93 
94 #if FMI_SUPPORT_A602
95  CString mMessageId;
97 #endif
98 
99 #if FMI_SUPPORT_A604
100  BOOL mDisplayImmediately;
102 
105 #endif
106 };
107 
108 #endif
BOOL OnInitDialog()
Initialize the dialog.
void updateDlgFields(int aSelectedProtocol)
Enable/disable controls as appropriate for the selected protocol.
int MessageProtocolType
Typedef for message protocols listed in the combo box.
Definition: CTxtMsgNewDlg.h:46
MessageProtocolType mMessageProtocol
Index of the selected message protocol.
Definition: CTxtMsgNewDlg.h:92
virtual void DoDataExchange(CDataExchange *aDataExchange)
Perform dialog data exchange and validation.
virtual ~CTxtMsgNewDlg()
Destructor.
afx_msg void OnCbnSelChangeMsgProtocol()
Selection Changed handler for the Protocol combo box.
afx_msg void OnBnClickedOk()
Click handler for the OK button.
FmiApplicationLayer & mCom
Pointer to the main app dialog.
Definition: CTxtMsgNewDlg.h:86
CTxtMsgNewDlg(CWnd *aParent, FmiApplicationLayer &aCom)
Constructor.
Serial communication controller for Garmin and FMI packets.
uint8 mMessageType
Value to use on the message_type member of the A604 text message.
MessageProtocolEnum
Enum for message protocols.
Definition: CTxtMsgNewDlg.h:50
unsigned char uint8
8-bit unsigned integer
Definition: garmin_types.h:62
afx_msg void OnEnChangeEditFields()
Edit Change handler for all edit boxes on the dialog.
BOOL mDisplayImmediately
If TRUE, the "Display Immediately" box is checked.
CString mMessageText
Contents of the Message Text edit box.
Definition: CTxtMsgNewDlg.h:89
CString mMessageId
Contents of the Message ID edit box.
Definition: CTxtMsgNewDlg.h:96
Modal dialog allowing the user to send a text message to the client.
Definition: CTxtMsgNewDlg.h:30