示例#1
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
}
示例#2
0
BOOL CFirmwareTabDlg::OnInitDialog()
{
 Super::OnInitDialog();

 //Prepare and tune tab control (See PSTabId enum)
 std::map<int, std::pair<IDeskView*, _TSTRING> >::const_iterator it;
 for(it = m_tabs.begin(); it != m_tabs.end(); ++it)
  m_param_sel_tab.AddPage(it->second.second.c_str(), NULL);
 m_param_sel_tab.SetEventListener(this);
 m_param_sel_tab.EnableItem(-1, false);

 //create parameters desk
 CRect rect;
 GetDlgItem(IDC_FW_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_HIDE);

 //create IO remapping desk
 GetDlgItem(IDC_FW_PD_FRAME)->GetWindowRect(rect);
 ScreenToClient(rect);
 mp_IORemappingDlg->Create(CIORemappingDlg::IDD,this);
 mp_IORemappingDlg->SetPosition(rect.TopLeft().x,rect.TopLeft().y);
 mp_IORemappingDlg->ShowWindow(SW_HIDE);

 //select current tab
 m_param_sel_tab.SetCurSel(m_tab_selection);
 m_tabs[m_tab_selection].first->Show(true);

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

//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_fw_options_btn, MLL::GetString(IDS_FW_VIEW_FWOPT_TT)));
 mp_ttc->SetMaxTipWidth(100); //Enable text wrapping
 mp_ttc->ActivateToolTips(true);

 mp_ContextMenuManager->Attach(this);

 SetTimer(TIMER_ID, 250, NULL);

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

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

 //Enable drap & drop functionality
 DragAcceptFiles(true);

 UpdateDialogControls(this,TRUE);
 return TRUE;  // return TRUE unless you set the focus to a control
}