26 CSpeedLimitAlertsDlg::CSpeedLimitAlertsDlg
54 CDataExchange * aDataExchange
57 CDialog::DoDataExchange( aDataExchange );
65 DDV_MinMaxInt( aDataExchange,
mTimeOver, 0x0, 0xff );
66 DDV_MinMaxInt( aDataExchange,
mTimeUnder, 0x0, 0xff );
73 pEdit->SetWindowText( text );
77 pEdit->SetWindowText( text );
151 SetResult( static_cast<uint8>( aResultCode ) );
163 CDialog::OnInitDialog();
181 CString resultCodeText;
182 switch( aResultCode )
185 resultCodeText.Format( _T(
"Success") );
188 resultCodeText.Format( _T(
"Error") );
191 resultCodeText.Format( _T(
"Unsupported") );
194 resultCodeText.Format( _T(
"Unknown") );
200 text.Format( _T(
"%d - %s"), aResultCode, resultCodeText );
202 pEdit->SetWindowText( text );
uint8 mTimeOver
Value of the time over edit box.
uint8 mMode
Selection of the mode combo box.
#define IDC_SPEED_LIMIT_SEND
void EnableFields(bool aValue)
Enable/Disable dialog fields.
void SetResult(uint8 aResultCode)
Set REsult text on the dialog.
#define IDC_SPEED_LIMIT_EDIT_TIME_OVER
boolean mAlertUser
Selection value of the alert user combo box.
float mThreshold
Value of the threshold edit box.
afx_msg void OnCbnSelchangeSpeedLimitCboMode()
Selection changed handler for the Mode combo box.
Dialog allowing the user to change speed limit alerts settings.
#define IDC_SPEED_LIMIT_EDIT_THRESHOLD
#define IDC_SPEED_LIMIT_EDIT_RESULT
virtual ~CSpeedLimitAlertsDlg()
Destructor.
unsigned char boolean
8-bit value representing FALSE (0) or TRUE (nonzero)
#define IDC_SPEED_LIMIT_CBO_MODE
void sendSetSpeedLimitAlerts(uint8 aMode, uint8 aTimeOver, uint8 aTimeUnder, boolean aAlertUser, float aThreshold)
Set FMI speed limit alerts.
afx_msg void OnBnClickedSend()
Click handler for the Send button.
afx_msg LRESULT OnEventSpeedLimitSetResultFromClient(WPARAM aResultCode, LPARAM)
Handler for the receipt event from Com.
Serial communication controller for Garmin and FMI packets.
FmiApplicationLayer & mCom
Reference to the FMI communication controller that this dialog uses.
BOOL OnInitDialog()
Initialize the dialog.
#define IDC_SPEED_LIMIT_EDIT_TIME_UNDER
#define IDC_SPEED_LIMIT_CBO_ALERT_USER
virtual void DoDataExchange(CDataExchange *aDataExchange)
Perform dialog data exchange and validation.
unsigned char uint8
8-bit unsigned integer
uint8 mTimeUnder
Value of the time under edit box.
#define WM_EVENT(_event)
Translation from an application event to the corresponding Windows message.