コード例 #1
0
/*******************************************************************************
 Function Name  : OnInitDialog
 Input(s)       :  -
 Output         : BOOL - TRUE if the focus isn't modified. FALSE otherwise
 Functionality  : This function will be called by the framework before showing a
                  dialog. This will init GUI components of a dialog
 Member of      : CHardwareListingCAN
 Author(s)      : Raja N
 Date Created   : 08.09.2004
*******************************************************************************/
BOOL CHardwareListingCAN::OnInitDialog()
{
    CDialog::OnInitDialog();
    // Update Hardware List with network details
    vSetHardwareList(m_psHwInterface, m_nSize);

	CComboBox* pEditBaudRateCAN = (CComboBox*)GetDlgItem(IDC_CAN_EDIT_BAUD_RATE);
	CComboBox* pEditBaudRateCANFD = (CComboBox*)GetDlgItem(IDC_CANFD_EDIT_BAUD_RATE);
	CWnd* pChkCANFD = (CWnd*)GetDlgItem(IDC_CHECK_CANFD);
	if(nullptr != pChkCANFD)
	{
		pChkCANFD->EnableWindow(FALSE);
	}
	if(nullptr!=pEditBaudRateCAN)
	{
		pEditBaudRateCAN ->EnableWindow(FALSE);
	}
	if(nullptr!=pEditBaudRateCANFD)
	{
		pEditBaudRateCANFD ->EnableWindow(FALSE);
	}
	if (m_pControllerDetails != nullptr)
	{
		for (int nIndex = 0; nIndex < m_nMaxChannelAllowed; nIndex++)
		{
			m_asDummyControllerDetails[nIndex] = m_pControllerDetails[nIndex];
		}
	}
	
    //Update the previously selected channel list
    vSetSelectedList();
   	m_nLastSelection = 0;

    return TRUE;
}
コード例 #2
0
ファイル: HardwareListing.cpp プロジェクト: cfz/busmaster
/*******************************************************************************
 Function Name  : OnInitDialog
 Input(s)       :  -
 Output         : BOOL - TRUE if the focus isn't modified. FALSE otherwise
 Functionality  : This function will be called by the framework before showing a
                  dialog. This will init GUI components of a dialog
 Member of      : CHardwareListing
 Author(s)      : Raja N
 Date Created   : 08.09.2004
*******************************************************************************/
BOOL CHardwareListing::OnInitDialog()
{
    CDialog::OnInitDialog();
    // Update Hardware List with network details
    vSetHardwareList(m_psHwInterface, m_nSize);
    //Update the previously selected channel list
    vSetSelectedList();
    return TRUE;
}