20 ON_BN_CLICKED( IDOK, OnBnClickedOk )
33 CSelectCannedResponseDlg::CSelectCannedResponseDlg
43 , mMessageId( aMessageId )
45 strcpy( mMessageText, aMessageText );
46 mMessageType = aMessageType;
62 CDataExchange * aDataExchange
65 CDialog::DoDataExchange( aDataExchange );
77 CDialog::OnInitDialog();
82 for( ; iter != mCom.mCannedResponses.
end(); iter++ )
84 if( iter->second.isValid() )
86 listItem.Format( _T(
"%d - %s"), iter->first, iter->second.getCurrentName() );
87 mListBox.AddString( listItem );
101 uint32 * selectedResponseIds =
new uint32[ mListBox.GetSelCount() ];
102 uint8 selectedIdCount = 0;
103 for(
int i = 0; i < mListBox.GetCount(); i++ )
105 if( mListBox.GetSel( i ) > 0 )
107 selectedResponseIds[selectedIdCount++] = mCom.mCannedResponses.getKeyAt( i );
111 bool success = mCom.sendCannedResponseTextMessage
120 delete [] selectedResponseIds;
130 _T(
"A long text message is already in progress. Wait until it has completed before sending another."),
131 _T(
"Message Already in Progress"), MB_OK
virtual ~CSelectCannedResponseDlg()
Destructor.
#define IDD_CANNED_RESPONSE_SELECT
const_iterator begin()
Iterator positioned at the first element in the map.
#define IDC_RESPSEL_LST_RESPONSES
const_iterator end()
Iterator positioned after the last element in the map.
Dialog allowing the user to select the canned responses that are allowed for a particular message...
BOOL OnInitDialog()
This function is called when the window is created.
Serial communication controller for Garmin and FMI packets.
virtual void DoDataExchange(CDataExchange *aDataExchange)
Perform dialog data exchange and validation.
Map whose contents are also saved to a file.
unsigned char uint8
8-bit unsigned integer
afx_msg void OnBnClickedOk()
OK button handler.
unsigned long int uint32
32-bit unsigned integer
Encapsulation of a message ID.