Пример #1
0
BOOL CCarburPageDlg::OnInitDialog()
{
 Super::OnInitDialog();

 m_shutoff_lo_threshold_edit.SetLimitText(4);
 m_shutoff_lo_threshold_spin.SetBuddy(&m_shutoff_lo_threshold_edit);
 m_shutoff_lo_threshold_spin.SetRangeAndDelta(250,7500,10);

 m_shutoff_hi_threshold_edit.SetLimitText(4);
 m_shutoff_hi_threshold_spin.SetBuddy(&m_shutoff_hi_threshold_edit);
 m_shutoff_hi_threshold_spin.SetRangeAndDelta(250,7500,10);

 m_epm_on_threshold_spin.SetBuddy(&m_epm_on_threshold_edit);
 m_epm_on_threshold_edit.SetLimitText(4);
 m_epm_on_threshold_edit.SetDecimalPlaces(2);
 m_epm_on_threshold_spin.SetRangeAndDelta(0.0f,50.0f,0.1f);

 m_shutoff_lo_threshold_edit_g.SetLimitText(4);
 m_shutoff_lo_threshold_spin_g.SetBuddy(&m_shutoff_lo_threshold_edit_g);
 m_shutoff_lo_threshold_spin_g.SetRangeAndDelta(250,7500,10);

 m_shutoff_hi_threshold_edit_g.SetLimitText(4);
 m_shutoff_hi_threshold_spin_g.SetBuddy(&m_shutoff_hi_threshold_edit_g);
 m_shutoff_hi_threshold_spin_g.SetRangeAndDelta(250,7500,10);

 m_shutoff_delay_spin.SetBuddy(&m_shutoff_delay_edit);
 m_shutoff_delay_edit.SetLimitText(4);
 m_shutoff_delay_edit.SetDecimalPlaces(2);
 m_shutoff_delay_spin.SetRangeAndDelta(0.0f,2.5f,0.01f);

 UpdateDialogControls(this, TRUE);
 return TRUE;  // return TRUE unless you set the focus to a control
               // EXCEPTION: OCX Property Pages should return FALSE
}
void CSgSelectionPreparationBar::ShowAudioSettings()
{
    if (m_pSettingsListener)
        m_pSettingsListener->ShowAudioSettings();
    
    UpdateDialogControls(this, FALSE);
}
Пример #3
0
BOOL CFirmwareTabDlg::OnInitDialog()
{
 Super::OnInitDialog();

 //create parameters desk
 CRect rect;
 GetDlgItem(IDC_FIRMWARE_SUPPORT_PD_FRAME)->GetWindowRect(rect);
 ScreenToClient(rect);
 mp_ParamDeskDlg->Create(CParamDeskDlg::IDD,this);
 mp_ParamDeskDlg->SetPosition(rect.TopLeft().x,rect.TopLeft().y);
 mp_ParamDeskDlg->SetTitle(MLL::LoadString(IDS_FW_RESERVE_PARAMETERS));
 mp_ParamDeskDlg->ShowSaveButton(false);
 mp_ParamDeskDlg->ShowWindow(SW_SHOWNORMAL);

 //create tables desk
 GetDlgItem(IDC_FIRMWARE_SUPPORT_TD_FRAME)->GetWindowRect(rect);
 ScreenToClient(rect); 
 mp_TablesPanel->Create(CTablesSetPanel::IDD, this);
 mp_TablesPanel->SetPosition(rect.TopLeft().x,rect.TopLeft().y, GetDlgItem(IDC_FIRMWARE_SUPPORT_VIEW_FWOPT));
 mp_TablesPanel->ShowWindow(SW_SHOWNORMAL);

 mp_ContextMenuManager->Attach(this);

 SetTimer(TIMER_ID,250,NULL);

 //в коде прошивки выдeлено ограниченное количество байтов дл¤ строки иныормации
 m_fw_information_edit.SetLimitText(48);

 m_hot_keys_supplier->Init(this);
 _RegisterHotKeys();

 UpdateDialogControls(this,TRUE);
 return TRUE;  // return TRUE unless you set the focus to a control
               // EXCEPTION: OCX Property Pages should return FALSE
}
Пример #4
0
void CButtonsPanel::OnTimer(UINT nIDEvent)
{
 //I know it is dirty hack, but... :-)
 UpdateDialogControls(this,TRUE);
 _EnableCharts(IsAllowed());
 Super::OnTimer(nIDEvent);
}
Пример #5
0
BOOL CCheckEngineTabDlg::OnInitDialog()
{
 Super::OnInitDialog();

 m_quick_help_text.SetWindowText(MLL::LoadString(IDS_CEPAGE_QUICK_HELP_TEXT));

 m_errors_list.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES | LVS_EX_GRIDLINES);

 //устанавливаем картинки состояния для чекбоксов...
 m_errors_list.SetImageList(&m_image_list, LVSIL_STATE);

 DPIAware dpia;
 m_errors_list.InsertColumn(0, MLL::LoadString(IDS_CEPAGE_ERROR_STATE), LVCFMT_LEFT, dpia.ScaleX(70));
 m_errors_list.InsertColumn(1, _T("BC"), LVCFMT_LEFT, 35);
 m_errors_list.InsertColumn(2, MLL::LoadString(IDS_CEPAGE_ERROR_DESCRIPTION), LVCFMT_LEFT, 450);

 SetTimer(TIMER_ID,250,NULL);

 ResetErrorsList();

 m_header_ctrl->Init(m_errors_list.GetHeaderCtrl());
 m_header_ctrl->SetTextColor(m_gray_text_color);

 UpdateDialogControls(this,TRUE);
 return TRUE;  // return TRUE unless you set the focus to a control
}
Пример #6
0
void CCarburPageDlg::EnableFuelInjection(bool i_enable)
{
 if (m_fuel_injection == i_enable)
  return; //already has needed state
 m_fuel_injection = i_enable;
 if (::IsWindow(this->m_hWnd))
  UpdateDialogControls(this, TRUE);
}
Пример #7
0
//разрешение/запрещение контроллов (всех поголовно)
void CCarburPageDlg::Enable(bool enable)
{
 if (m_enabled == enable)
  return; //already has needed state
 m_enabled = enable;
 if (::IsWindow(m_hWnd))
  UpdateDialogControls(this, TRUE);
}
Пример #8
0
void CCopyTagBlkDlg::OnMakeDefaultBlock()
  {
  int i = LBlksList.GetCurSel();
  if (i>=0)
    {
    UpdateDialogControls(this, FALSE);
    }
  }
Пример #9
0
void SpellCheck::SettingsChanged(void)
{
  m_ignoreWords.clear();
  if (GetSafeHwnd() != 0)
  {
    UpdateDialogControls();
    ShowWordFromSelection();
  }
}
Пример #10
0
BOOL CButtonsPanel::OnInitDialog()
{
 Super::OnInitDialog();

 SetTimer(TIMER_ID, 250, NULL);

 UpdateDialogControls(this,TRUE);
 return TRUE;  // return TRUE unless you set the focus to a control
               // EXCEPTION: OCX Property Pages should return FALSE
}
Пример #11
0
void CCopyTagBlkDlg::OnCheckChangeRBlkList()
  {
  int i = RBlksList.GetCurSel();
  ASSERT(i>=0);
  CString Txt;
  RBlksList.GetText(i, Txt);
  CCopyBlock::MoveBlockLocation(sModelClass(), (char*)(const char*)Txt, RBlksList.GetCheck(i));
  BuildBlockList();
  UpdateDialogControls(this, FALSE);
  }
Пример #12
0
LRESULT CDDEStatsDlg::OnUpdateStats(WPARAM wParam, LPARAM lParam)
  {
  static int UpdateCnt = 0;
  const char* UpdateRotate[4] = {"/","-","\\","|"};
  wParam &= (~(SUB_UPDATE_SENDMSG|SUB_UPDATE_SUBSCHANGED));
  const bool IsExec = (wParam==SUB_UPDATE_EOWRITE || wParam==SUB_UPDATE_EOEXEC);
  if (!IsExec)
    UpdateDialogControls(this, FALSE);
  if (bDidInit && pMngr->DDEExec())
    {
    const int TagCnt = pMngr->DDEExec()->SubsData.GetSize();
    char Buff[128];
    if (!XBusy())
      {
      SetDlgItemText(IDC_DDESTATUS_TXT, ".");
      sprintf(Buff, "Stopped! (%d tags)", TagCnt);
      }
    else
      {
      if (IsExec)
        {
        if (++UpdateCnt>3)
          UpdateCnt=0;
        }
      SetDlgItemText(IDC_DDESTATUS_TXT, UpdateRotate[UpdateCnt]);
      sprintf(Buff, "%d subscription tags", TagCnt);
      }
    SetDlgItemText(IDC_DDESUBSCNT_TXT, Buff);

    if (m_ShowStats==0)
      {//show stats...
      m_StatsList.ResetContent();
      for (int i=0; i<MaxDDEStats; i++)
        {
        sprintf(Buff, "%d\t%s", pMngr->DDEExec()->StatsCnt[i], DDEStatDescs[i]);
        m_StatsList.InsertString(-1, Buff);
        if (IsExec)
          pMngr->DDEExec()->StatsCnt[i] = 0;
        }
      UpdateData(FALSE);
      }
    else if (m_ShowStats==1)
      {//show tag list & values...
      if (bSubsChanged)
        {
        m_StatsList.ResetContent();
        //pMngr->DDEExec()->BuildTagList(&m_StatsList);
        pMngr->DDEExec()->BuildSubsList(&m_StatsList);
        UpdateData(FALSE);
        bSubsChanged = 0;
        }
      }
    }
  return TRUE;
  }
void CDlg_PricingConfiguration::OnDel() 
{
	if(m_chart.DeleteItem(m_iItem))
	{
		m_dValue = 0;
		m_sLabel = "";
		m_iItem  = -1;
		UpdateData(FALSE);
		UpdateDialogControls(this,FALSE);
	}
}
void CSgSelectionPreparationBar::OnShowSgSettings() 
{
    if (m_pSettingsListener == NULL)
        return;

    m_pSettingsListener->ShowSgSettings();

    UpdateHotKeyButton();
    
    UpdateDialogControls(this, FALSE);
}
Пример #15
0
void CFirmwareTabDlg::OnTimer(UINT nIDEvent)
{
 //I know it is dirty hack, but... :-)
 UpdateDialogControls(this,TRUE);
 Super::OnTimer(nIDEvent);

 //обновл¤ем состо¤ние (если нужно)
 bool pd_enable = IsFirmwareOpened();
 if (mp_ParamDeskDlg->IsEnabled()!=pd_enable)
  mp_ParamDeskDlg->Enable(pd_enable);
}
Пример #16
0
void CADCCompenPageDlg::EnableSECU3TItems(bool i_enable)
{
 if (m_enable_secu3t_features == i_enable)
  return; //already has needed state
 m_enable_secu3t_features = i_enable;
 if (::IsWindow(m_hWnd))
 {
  UpdateDialogControls(this, TRUE);
  RedrawWindow(); //strange, without this function call spin buttons don't update correctly...
 }
}
Пример #17
0
void CDlg_TDDemandProfile::OnDel() 
{
	if(m_chart.DeleteItem(m_iItem))
	{
		m_dValue = 0;
		m_sLabel = "";
		m_iItem  = -1;
		UpdateData(FALSE);
		UpdateDialogControls(this,FALSE);
	}
}
Пример #18
0
//разрешает/запрещает элементы меню св¤занные с приложением
void CFirmwareTabDlg::EnableAppItems(bool enable)
{
 m_is_app_items_available = enable;

 if (!::IsWindow(this->m_hWnd))
  return;

 UpdateDialogControls(this,TRUE);

 //если меню отображаетс¤ в текущий момент, то не смотр¤ на то что элементы запрещены,
 //прорисовка останетс¤ старой (недоделка Microsoft?).  ороче говор¤ делаем это сами
 mp_ContextMenuManager->EnableAppMenuItems(enable);
}
Пример #19
0
BOOL CChangeTag::OnInitDialog() 
  {
  CDialog::OnInitDialog();
  pTTC = new CCustomToolTipCtrl(this);

  for (int a=0; a<NAccessWnds; a++)
    {
    if (m_OldTag.GetLength()==0 && gs_AccessWnds.CurTag(a) && strlen(gs_AccessWnds.CurTag(a))>0)
      {
      m_OldTag = gs_AccessWnds.CurTag(a);
      UpdateData(FALSE);
      }
    }

  m_ReadOnly=false;
  //Strng WrkTag(m_OldTag);
  //WrkTag+=".Type";
  //CXM_ObjectTag ObjTag(WrkTag(), TABOpt_ValCnvsOnce);
  //CXM_ObjectData ObjData;
  //CXM_Route Route;
  //if (gs_Exec.XReadTaggedItem(NULL, ObjTag, ObjData, Route))
  //  {
  //  CPkDataItem * pItem = ObjData.FirstItem();
  //  if (IsStrng(pItem->Type()))
  //    {
  //    PkDataUnion &V=*pItem->Value();
  //    Strng TheType = pItem->Value()->GetString("", "", 0, "");
  //    m_ReadOnly = (TheType.XStrICmp("CFlange")==0);
  //    };
  //  }
  //else
  //  {
  //  }

  if (m_ReadOnly)
    m_NewTag=m_OldTag;

  if (m_NewTag.GetLength()>0)
    {
    GetDlgItem(IDC_NEWTAG)->SetFocus();
    ((CEdit*)GetDlgItem(IDC_NEWTAG))->SetSel(0, -1);
    if (m_ReadOnly)
      {
      GetDlgItem(IDC_OLDTAG)->EnableWindow(false);
      GetDlgItem(IDC_NEWTAG)->EnableWindow(false);
      }
    return False;
    }
  UpdateDialogControls(this, FALSE);
  return TRUE;
  }
Пример #20
0
void CSubtitleUpDlg::OnItemChanged(NMHDR* pNMHDR, LRESULT* pResult)
{
    LPNMLISTVIEW pNMLV = (LPNMLISTVIEW)(pNMHDR);

    if (((pNMLV->uOldState | pNMLV->uNewState) == 0x3000) && pNMLV->lParam) {
        SubtitlesProvider& _provider = *(SubtitlesProvider*)pNMLV->lParam;
        _provider.Enabled(SPF_UPLOAD, pNMLV->uNewState == 0x2000 ? TRUE : FALSE);
        auto& s = AfxGetAppSettings();
        s.strSubtitlesProviders = CString(m_pMainFrame->m_pSubtitlesProviders->WriteSettings().c_str());
        s.SaveSettings();
    }

    UpdateDialogControls(this, FALSE);
}
void CSgSelectionPreparationBar::OnChangeRecordCustom()
{
    m_bRecordFullScreen = false;
    m_pSelectionListener->SetRecordFullScreen(m_bRecordFullScreen); 

    CRect rcCustom = GetCustomSelRect();

    if (m_pSelectionListener) {
       m_pSelectionListener->ChangeSelectionRectangle(rcCustom, false);
       m_pSelectionListener->SetLastCustomRect(rcCustom);
    }

    UpdateDialogControls(this, FALSE);
}
Пример #22
0
void SpellCheck::ShowWordFromSelection(void)
{
  // Create the dialog, if needed
  if (GetSafeHwnd() == 0)
    I7BaseDialog::Create(MAKEINTRESOURCE(IDD),m_edit);

  // Get the text of the current selection
  CHARRANGE select = m_edit->GetSelect();
  m_currentBadWord = m_edit->GetTextRange(select.cpMin,select.cpMax);

  // Use the selection as the word to spell check
  m_settingBadWord = true;
  m_badWord.SetWindowText(m_currentBadWord);
  m_settingBadWord = false;
  int len = m_currentBadWord.GetLength();
  m_badWord.SetSel(len,len);
  OnChangedBadWord();

  // Get suggestions for the correct spelling
  char** suggested = NULL;
  int numSuggested = spell->suggest(&suggested,
    TextFormat::UnicodeToLatin1(m_currentBadWord));

  // Update the list of suggestions
  m_suggestions.ResetContent();
  if (numSuggested > 0)
  {
    for (int i = 0; i < numSuggested; i++)
    {
      CStringW suggest = TextFormat::Latin1ToUnicode(suggested[i]);
      m_suggestions.AddString(CString(suggest));
      free(suggested[i]);
    }
    m_suggestions.SetCurSel(0);
  }
  free(suggested);

  // Move the window so that the selection is visible
  m_edit->MoveShowSelect(this);

  // If not visible, show the dialog
  if (IsWindowVisible() == FALSE)
  {
    UpdateDialogControls();
    ShowWindow(SW_SHOW);
    m_badWord.SetFocus();
  }
}
void CSgSelectionPreparationBar::OnShowHidePresentationBar()
{
    if (m_bShowPresentationBar == TRUE)
        m_bShowPresentationBar = FALSE;
    else
        m_bShowPresentationBar = TRUE;
    m_pSelectionListener->SetShowPresentationBar(m_bShowPresentationBar == TRUE);

    if(m_pPresentationBar != NULL)
    {
       m_pPresentationBar->ShowWindow(m_bShowPresentationBar);
       //m_pPresentationBar->SetForegroundWindow();
    }

    UpdateDialogControls(this, FALSE);
}
Пример #24
0
void CDlg_TDDemandProfile::OnAdd() 
{
	if(m_iItem < 0)
	{
		UpdateData();
		if(m_dValue > 0.0 && !m_sLabel.IsEmpty())
		{
			m_chart.AddValue(m_dValue,m_sLabel,TRUE);
			m_iItem = -1;
			m_dValue = 0.0;
			m_sLabel = "";
			UpdateData(FALSE);
		}
	}
	UpdateDialogControls(this,FALSE);
}
Пример #25
0
BOOL CInjectorPageDlg::OnInitDialog()
{
 Super::OnInitDialog();

 m_cyldisp_spin.SetBuddy(&m_cyldisp_edit);
 m_cyldisp_edit.SetLimitText(6);
 m_cyldisp_edit.SetDecimalPlaces(4);
 m_cyldisp_spin.SetRangeAndDelta(0.05f, 3.0000f, 0.0001);
 m_cyldisp_edit.SetRange(0.05f, 3.0000f);

 m_flowrate_spin.SetBuddy(&m_flowrate_edit);
 m_flowrate_edit.SetLimitText(6);
 m_flowrate_edit.SetDecimalPlaces(2);
 m_flowrate_spin.SetRangeAndDelta(50.00f, 1000.00f, 0.02f);
 m_flowrate_edit.SetRange(50.00f, 1000.00f);

 m_inj_timing_spin.SetBuddy(&m_inj_timing_edit);
 m_inj_timing_edit.SetLimitText(4);
 m_inj_timing_edit.SetDecimalPlaces(0);
 m_inj_timing_spin.SetRangeAndDelta(0.0f, 720.0f, 1.0);
 m_inj_timing_edit.SetRange(0.0f, 720.0f);

 m_inj_timing_crk_spin.SetBuddy(&m_inj_timing_crk_edit);
 m_inj_timing_crk_edit.SetLimitText(4);
 m_inj_timing_crk_edit.SetDecimalPlaces(0);
 m_inj_timing_crk_spin.SetRangeAndDelta(0.0f, 720.0f, 1.0);
 m_inj_timing_crk_edit.SetRange(0.0f, 720.0f);

 //create a tooltip control and assign tooltips
 mp_ttc.reset(new CToolTipCtrlEx());
 VERIFY(mp_ttc->Create(this, WS_POPUP | TTS_ALWAYSTIP | TTS_BALLOON));
 VERIFY(mp_ttc->AddWindow(&m_cyldisp_edit, MLL::GetString(IDS_PD_INJECTOR_CYLDISP_EDIT_TT)));
 VERIFY(mp_ttc->AddWindow(&m_cyldisp_spin, MLL::GetString(IDS_PD_INJECTOR_CYLDISP_EDIT_TT)));
 VERIFY(mp_ttc->AddWindow(&m_sqrnum_combo, MLL::GetString(IDS_PD_INJECTOR_SQUIRTNUM_COMBO_TT)));
 VERIFY(mp_ttc->AddWindow(&m_inj_timing_edit, MLL::GetString(IDS_PD_INJECTOR_TIMING_EDIT_TT)));
 VERIFY(mp_ttc->AddWindow(&m_inj_timing_spin, MLL::GetString(IDS_PD_INJECTOR_TIMING_EDIT_TT)));

 mp_ttc->SetMaxTipWidth(100); //Enable text wrapping
 mp_ttc->ActivateToolTips(true);

 _FillInjCfgComboBox();
 _FillSqrNumComboBox();

 UpdateData(FALSE);
 UpdateDialogControls(this, TRUE);
 return TRUE;  // return TRUE unless you set the focus to a control
}
Пример #26
0
BOOL CCKPSPageDlg::OnInitDialog() 
{
 Super::OnInitDialog();

 m_ignition_cogs_edit.SetLimitText(2);
 m_ignition_cogs_edit.SetDecimalPlaces(2);
 m_ignition_cogs_spin.SetBuddy(&m_ignition_cogs_edit);
 m_ignition_cogs_spin.SetRangeAndDelta(1,55,1);

 _FillCKPSTeethBTDCComboBox(); //инициализируем комбо бокс числа зубьев до в.м.т.
 _FillCKPSEngineCylComboBox(); //инициализируем комбо бокс цисла цилиндров двигателя.
 UpdateData(FALSE);  //инициализируем контроллы диалога данными
 UpdateDialogControls(this,TRUE);

 return TRUE;  // return TRUE unless you set the focus to a control
               // EXCEPTION: OCX Property Pages should return FALSE
}
Пример #27
0
void CProgressBar::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
// I'm not entirely sure how much of this is necessary, but it doesn't seem to
// do any harm, and things didn't work properly until I put it in...
{
	CCmdUI state;
	state.m_pOther = this;
	state.m_nIndexMax = (UINT32)m_nCount;

	for (state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax;
	  state.m_nIndex++)
	{
		state.m_nID = 0;
		state.DoUpdate(pTarget, bDisableIfNoHndler);
	}

	// update the dialog controls added to the status bar (of which there are none)
	UpdateDialogControls(pTarget, bDisableIfNoHndler);
}
//************************************************************************************
void CBCGPRadialMenu::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
{
	ASSERT_VALID (this);

	if (m_pRadialMenuObject != NULL)
	{
		CBCGPRadialMenuCmdUI state;
		state.m_pOther = this;

		for (int i = 0; i < (int)m_pRadialMenuObject->m_arItems.GetSize(); i++)
		{
			m_pRadialMenuObject->m_arItems[i]->OnUpdateCmdUI(&state, pTarget, bDisableIfNoHndler);
		}
	}

	// update the dialog controls added to the ribbon
	UpdateDialogControls(pTarget, bDisableIfNoHndler);
}
void CSgSelectionPreparationBar::OnChangeRecordFullScreen()
{
    m_bRecordFullScreen = true;
    m_pSelectionListener->SetRecordFullScreen(m_bRecordFullScreen); 

   

    CRect rcDesktop;
    // The first monitor
    MfcUtils::GetDesktopRectangle(rcDesktop);

    CRect rcCustom = GetCustomSelRect();
    if (m_pSelectionListener) {
       m_pSelectionListener->ChangeSelectionRectangle(rcDesktop, false);
       m_pSelectionListener->SetLastCustomRect(rcCustom);
    }

    UpdateDialogControls(this, FALSE);
}
void CDlg_VehicleClassification::OnChartSelectedItem(NMHDR* pNMHDR, LRESULT* pResult)
{
	LPNMCHARTCTRL nmchart = (LPNMCHARTCTRL)pNMHDR;
	
	m_iItem = nmchart->iItem;

	if(m_iItem >= 0)
	{
		m_dValue = (float)(nmchart->dValue);  // convert to float to avoid many decimals
		m_sLabel = nmchart->sLabel;
	}else
	{
		m_dValue = 0;
		m_sLabel = "";
	}
	UpdateData(FALSE);
	UpdateDialogControls(this,FALSE);
	*pResult = FALSE;
}