Garmin Fleet Management Controller  2.19.0
CTxtMsgDeleteRequestDlg.cpp
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * MODULE NAME:
4 * CTxtMsgDeleteRequestDlg.cpp
5 *
6 * Copyright 2008-2009 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #include "stdafx.h"
11 #include "CFmiApplication.h"
13 #include "util.h"
14 
15 IMPLEMENT_DYNAMIC( CTxtMsgDeleteRequestDlg, CDialog )
16 
17 BEGIN_MESSAGE_MAP( CTxtMsgDeleteRequestDlg, CDialog )
18  ON_EN_CHANGE( IDC_MSGDEL_EDIT_MSG_ID, OnEnChangeEditMsgId )
19  ON_BN_CLICKED( IDOK, OnBnClickedOk )
20 END_MESSAGE_MAP()
21 
22 //----------------------------------------------------------------------
26 //----------------------------------------------------------------------
27 CTxtMsgDeleteRequestDlg::CTxtMsgDeleteRequestDlg
28  (
29  CWnd * aParent,
30  FmiApplicationLayer & aCom
31  )
32  : CDialog( IDD_TXT_MSG_DELETE_REQUEST, aParent )
33  , mCom( aCom )
34  , mMessageId( _T("") )
35 {
36 }
37 
38 //----------------------------------------------------------------------
40 //----------------------------------------------------------------------
42 {
43 }
44 
45 //----------------------------------------------------------------------
48 //----------------------------------------------------------------------
50  (
51  CDataExchange * aDataExchange
52  )
53 {
54  CDialog::DoDataExchange( aDataExchange );
55  DDX_Text( aDataExchange, IDC_MSGDEL_EDIT_MSG_ID, mMessageId );
56 }
57 
58 //----------------------------------------------------------------------
64 //----------------------------------------------------------------------
66 {
67  CDialog::OnInitDialog();
68 
69  return TRUE;
70 } /* OnInitDialog() */
71 
72 //----------------------------------------------------------------------
76 //----------------------------------------------------------------------
78 {
79  UpdateData( TRUE );
80  if( mMessageId != "" )
81  {
82  GetDlgItem( IDOK )->EnableWindow( TRUE );
83  }
84  else
85  {
86  GetDlgItem( IDOK )->EnableWindow( FALSE );
87  }
88 } /* OnEnChangeEditMsgId() */
89 
90 //----------------------------------------------------------------------
96 //----------------------------------------------------------------------
98 {
99  UpdateData( TRUE );
100 
102  OnOK();
103 } /* OnBnClickedOk() */
virtual void DoDataExchange(CDataExchange *aDataExchange)
Perform dialog data exchange and validation.
afx_msg void OnEnChangeEditMsgId()
Edit Change handler for Message ID text box.
FmiApplicationLayer & mCom
Reference to the FMI communication controller.
#define FALSE
Definition: garmin_types.h:46
virtual ~CTxtMsgDeleteRequestDlg()
Destructor.
#define IDC_MSGDEL_EDIT_MSG_ID
Definition: resource.h:371
#define TRUE
Definition: garmin_types.h:45
codepage_type mClientCodepage
Code page used for encoding of text fields when communicating with the client.
afx_msg void OnBnClickedOk()
Click handler for the OK button.
Serial communication controller for Garmin and FMI packets.
void sendMessageDeleteRequest(const MessageId &aMessageId)
Ask the server to delete a text message.
BOOL OnInitDialog()
Initialize the dialog.
CString mMessageId
Message ID entered by the user.
Modal dialog allowing the user to request the status of a server to client text message.
Encapsulation of a message ID.
Definition: MessageId.h:26
#define IDD_TXT_MSG_DELETE_REQUEST
Definition: resource.h:39