Garmin Fleet Management Controller  2.19.0
CTxtMsgStatusDlg.cpp
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * MODULE NAME:
4 * CTxtMsgStatusDlg.cpp
5 *
6 * Copyright 2008-2009 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #include "stdafx.h"
11 #include "CTxtMsgStatusDlg.h"
12 
13 IMPLEMENT_DYNAMIC( CTxtMsgStatusDlg, CDialog )
14 
15 BEGIN_MESSAGE_MAP( CTxtMsgStatusDlg, CDialog )
16 END_MESSAGE_MAP()
17 
18 //----------------------------------------------------------------------
24 //----------------------------------------------------------------------
25 CTxtMsgStatusDlg::CTxtMsgStatusDlg
26  (
27  CWnd * aParent,
28  FmiApplicationLayer & aCom,
29  const text_msg_status_event_type * aStatusEvent
30  )
31  : CDialog( IDD_TXT_MSG_STATUS, aParent )
32  , mCom( aCom )
33  , mStatusEvent( *aStatusEvent )
34  , mTextMessageId( _T("") )
35  , mTextMessageStatus( _T("") )
36 {
37 }
38 
39 //----------------------------------------------------------------------
41 //----------------------------------------------------------------------
43 {
44 }
45 
46 //----------------------------------------------------------------------
49 //----------------------------------------------------------------------
51  (
52  CDataExchange * aDataExchange
53  )
54 {
55  CDialog::DoDataExchange( aDataExchange );
56  DDX_Text( aDataExchange, IDC_MSGSTATUS_TXT_ID, mTextMessageId );
57  DDX_Text( aDataExchange, IDC_MSGSTATUS_TXT_STATUS, mTextMessageStatus );
58 }
59 
60 //----------------------------------------------------------------------
66 //----------------------------------------------------------------------
68 {
69  CDialog::OnInitDialog();
70 
72 
74  {
76  mTextMessageStatus = _T("unread");
77  break;
79  mTextMessageStatus = _T("read");
80  break;
82  mTextMessageStatus = _T("not found");
83  break;
84  default:
85  mTextMessageStatus = _T("invalid");
86  break;
87  }
88 
89  UpdateData( FALSE );
90  return TRUE;
91 } /* OnInitDialog */
fmi_A604_message_status message_status
The status of the text message.
Definition: EventId.h:166
#define IDD_TXT_MSG_STATUS
Definition: resource.h:42
text_msg_status_event_type mStatusEvent
The text message status event.
Modal pop-up dialog displaying the status of a server to client text message.
CString mTextMessageStatus
String representation of the text message status ("Unread", "Not Found", etc)
#define FALSE
Definition: garmin_types.h:46
MessageId msg_id
The message ID.
Definition: EventId.h:165
BOOL OnInitDialog()
Initialize the dialog.
#define TRUE
Definition: garmin_types.h:45
#define IDC_MSGSTATUS_TXT_STATUS
Definition: resource.h:276
CString toCString(codepage_type aCodePage) const
CString representation of the message ID.
Definition: MessageId.cpp:167
codepage_type mClientCodepage
Code page used for encoding of text fields when communicating with the client.
CString mTextMessageId
The text message ID. This will be in hexadecimal if the message ID is not displayable ASCII...
Serial communication controller for Garmin and FMI packets.
#define IDC_MSGSTATUS_TXT_ID
Definition: resource.h:275
Structure containing details for a text message status from the client.
Definition: EventId.h:163
virtual ~CTxtMsgStatusDlg()
Destructor.
virtual void DoDataExchange(CDataExchange *aDataExchange)
Perform dialog data exchange and validation.
FmiApplicationLayer & mCom
Reference to the communication layer.