Garmin Fleet Management Controller  2.19.0
CSelectCommPortDlg Class Reference

Modal dialog allowing the user to select the port to use to communicate with the client. More...

#include <CSelectCommPortDlg.h>

+ Inheritance diagram for CSelectCommPortDlg:

Public Member Functions

 CSelectCommPortDlg (CWnd *aParent=NULL)
 Constructor. More...
 
virtual ~CSelectCommPortDlg ()
 Destructor. More...
 

Protected Member Functions

virtual void DoDataExchange (CDataExchange *aDataExchange)
 Perform dialog data exchange and validation. More...
 
afx_msg void OnBnClickedCancel ()
 Click handler for the Cancel button. More...
 
afx_msg void OnBnClickedOk ()
 Click handler for the OK button. More...
 
BOOL OnInitDialog ()
 Initialize the dialog. More...
 

Protected Attributes

int mSelectedPortIndex
 Index of the selected port in the drop down. More...
 

Detailed Description

Modal dialog allowing the user to select the port to use to communicate with the client.

Definition at line 19 of file CSelectCommPortDlg.h.

Constructor & Destructor Documentation

CSelectCommPortDlg::CSelectCommPortDlg ( CWnd *  aParent = NULL)

Constructor.

Parameters
aParentThe parent of this dialog

Definition at line 28 of file CSelectCommPortDlg.cpp.

CSelectCommPortDlg::~CSelectCommPortDlg ( )
virtual

Destructor.

Definition at line 39 of file CSelectCommPortDlg.cpp.

References DoDataExchange().

Member Function Documentation

void CSelectCommPortDlg::DoDataExchange ( CDataExchange *  aDataExchange)
protectedvirtual

Perform dialog data exchange and validation.

Parameters
aDataExchangeThe DDX context

Definition at line 48 of file CSelectCommPortDlg.cpp.

References IDC_COMPORT_CBO_PORT, and mSelectedPortIndex.

Referenced by ~CSelectCommPortDlg().

void CSelectCommPortDlg::OnBnClickedCancel ( )
protected

Click handler for the Cancel button.

Close the dialog.

Definition at line 128 of file CSelectCommPortDlg.cpp.

void CSelectCommPortDlg::OnBnClickedOk ( )
protected

Click handler for the OK button.

Starts the init process with the Com Port chosen.

Definition at line 90 of file CSelectCommPortDlg.cpp.

References SerialPort::getInstance(), IDC_COMPORT_CBO_PORT, SerialPort::initSerialPort(), TcpIpPort::initTcpPort(), mSelectedPortIndex, TCP_PORT_NAME, and TRUE.

BOOL CSelectCommPortDlg::OnInitDialog ( )
protected

Initialize the dialog.

This function is called when the window is created. It sets up the parent, so it can get info from and send a message to Com. It also enumerates the serial ports on the system (trying both the registry and CreateFile methods) and updates the combo box with the list of ports found.

Returns
TRUE, since this function does not set focus to a control

Definition at line 66 of file CSelectCommPortDlg.cpp.

References SerialPort::getPortList(), IDC_COMPORT_CBO_PORT, and TRUE.

Member Data Documentation

int CSelectCommPortDlg::mSelectedPortIndex
protected

Index of the selected port in the drop down.

Definition at line 45 of file CSelectCommPortDlg.h.

Referenced by DoDataExchange(), and OnBnClickedOk().


The documentation for this class was generated from the following files: