Ejemplo n.º 1
0
void CHardwareListingCAN::OnEnKillfocusCanEditBaudRate()
{
	OnKillFocusOfEditBox(&m_omEditBaudRate,m_omStrEditBaudRate,0); //Validation on Kill Focus
	CButton* pomButtonCANFD = (CButton*) GetDlgItem(IDC_CHECK_CANFD);
	CButton* pomButtonWnd = (CButton*) GetFocus();
	if(nullptr != pomButtonCANFD)
	{
		if(TRUE == pomButtonCANFD->IsWindowEnabled())
		{
			/*UINT unButton = pomButtonCANFD->GetState();*/
			if(nullptr != pomButtonWnd && nullptr != pomButtonCANFD && pomButtonCANFD == pomButtonWnd)
			{
				if(BST_CHECKED == m_chkCANFD.GetCheck())
				{
					m_chkCANFD.SetCheck(BST_UNCHECKED);
					m_omCANFDEditBaudRate.EnableWindow(FALSE);
				}
				else
				{
					m_chkCANFD.SetCheck(BST_CHECKED);
					m_omCANFDEditBaudRate.EnableWindow(TRUE);
				}
			}
		}
	}
}
Ejemplo n.º 2
0
void CErrHandlerDlg::OnCbtnErrorOk() 
{
    CButton* pomButton       = NULL;
    CString omStrHandlerName = STR_EMPTY ;
    CString omStrControl     = STR_EMPTY ;
    INT nCheck               = 0;
    BOOL bIsEnable           = TRUE;
    // Get the selected handlers either for deleteting or adding and
    // add the name in the array
    for(int j=0; j<defERROR_HANDLER_NUMBER; j++)
    {
        pomButton = 
        (CButton*)GetDlgItem(IDC_CHKB_ERROR_ACTIVE_HANDLER + j);
        if(pomButton != NULL )
        {
            nCheck      = pomButton->GetCheck();
            bIsEnable   = pomButton->IsWindowEnabled();
            pomButton->GetWindowText(omStrControl);
            omStrControl.Replace(_T("Error"),_T(""));
            omStrControl.TrimLeft();
            omStrControl.TrimRight();
            omStrControl.Replace(' ','_');
            omStrHandlerName = omStrControl;
            if(nCheck == 1 && bIsEnable != 0 )
            {
                m_omStrArrayErrorHandler.Add(omStrHandlerName);
            }
       }
    }
    CDialog::OnOK();
}
Ejemplo n.º 3
0
void CBusEventHandlerDlg::OnBnClickedOk()
{
    CButton* pomButton       = NULL;
    CString omStrHandlerName = STR_EMPTY ;
    CString omStrControl     = STR_EMPTY ;
    INT nCheck               = 0;
    BOOL bIsEnable           = TRUE;
    // Get the selected handlers either for deleteting or adding and
    // add the name in the array
    for(int j=0; j<defBUSEV_HANDLER_NUMBER; j++)
    {
        pomButton = (CButton*)GetDlgItem(IDC_CHKB_BUSEV_CONNECT_HANDLER + j);
        if(pomButton != NULL )
        {
            nCheck      = pomButton->GetCheck();
            bIsEnable   = pomButton->IsWindowEnabled();
            pomButton->GetWindowText(omStrControl);
            omStrControl.TrimLeft();
            omStrControl.TrimRight();
            omStrControl.Replace(' ','_');
            omStrControl.Replace('-','_');
            omStrHandlerName = omStrControl;
            if(nCheck == 1 && bIsEnable != 0 )
            {
                m_omStrArrayBusEventHandler.Add(omStrHandlerName);
            }
        }
    }
    OnOK();
}
Ejemplo n.º 4
0
void CAdminDlg::OnDblclkTree(NMHDR* pNMHDR, LRESULT* pResult) 
{
	// TODO: Add your control notification handler code here
	CButton *Btn = (CButton *)GetDlgItem(IDEDIT);
	if (Btn->IsWindowEnabled())	OnEdit();
	*pResult = 0;
}
Ejemplo n.º 5
0
void CFormatTabDlg::UpdateButton(CButton& button, BOOL b)
{
	if (b != button.IsWindowEnabled())
		button.EnableWindow(b);
}