void CUpgradeDialog::OnTaxCheck() { UpdateDialog(); }
void CUpgradeDialog::OnSelchangeTaxList() { m_nTaxIndex = m_TaxList.GetCurSel(); UpdateDialog(); }
void CUpgradeDialog::OnSelchangeCountryList() { UpdateForCurrentCountry(); UpdateDialog(); }
void EditFaceDataMod::ValueChanged () { NotifyDependents(FOREVER, PART_TOPO, REFMSG_CHANGE); if (ip && editMod==this) UpdateDialog(); }
BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) { //if (!m_hDlg) return FALSE; switch(message) { case WM_INITDIALOG: { return TRUE; } break; case WM_TIMER: { int iPage = TabCtrl_GetCurSel (GetDlgItem(m_hDlg, IDC_LEFTTABS)); ShowWindow(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), iPage?SW_NORMAL:SW_HIDE); ShowWindow(GetDlgItem(m_hDlg, IDC_REGLIST), iPage?SW_HIDE:SW_NORMAL); } break; case WM_NOTIFY: { HWND tabs = GetDlgItem(m_hDlg, IDC_LEFTTABS); NMHDR* pNotifyMessage = NULL; pNotifyMessage = (LPNMHDR)lParam; if (pNotifyMessage->hwndFrom == tabs) { int iPage = TabCtrl_GetCurSel (tabs); ShowWindow(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), iPage?SW_NORMAL:SW_HIDE); ShowWindow(GetDlgItem(m_hDlg, IDC_REGLIST), iPage?SW_HIDE:SW_NORMAL); } break; } case WM_COMMAND: { CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); CtrlRegisterList *reglist = CtrlRegisterList::getFrom(GetDlgItem(m_hDlg,IDC_REGLIST)); switch(LOWORD(wParam)) { case IDC_SHOWVFPU: vfpudlg->Show(true); break; case IDC_FUNCTIONLIST: switch (HIWORD(wParam)) { case CBN_DBLCLK: case CBN_SELCHANGE: { HWND lb = GetDlgItem(m_hDlg,LOWORD(wParam)); int n = ListBox_GetCurSel(lb); if (n!=-1) { unsigned int addr = (unsigned int)ListBox_GetItemData(lb,n); ptr->gotoAddr(addr); } } break; }; break; case IDC_GOTOINT: switch (HIWORD(wParam)) { case LBN_SELCHANGE: { HWND lb =GetDlgItem(m_hDlg,LOWORD(wParam)); int n = ComboBox_GetCurSel(lb); unsigned int addr = (unsigned int)ComboBox_GetItemData(lb,n); if (addr != 0xFFFFFFFF) ptr->gotoAddr(addr); } break; }; break; case IDC_GO: { SetDebugMode(false); Core_EnableStepping(false); MainWindow::UpdateMenus(); } break; case IDC_STEP: { Core_DoSingleStep(); Sleep(1); _dbg_update_(); ptr->gotoPC(); UpdateDialog(); vfpudlg->Update(); } break; case IDC_STEPOVER: { SetDebugMode(false); CBreakPoints::AddBreakPoint(cpu->GetPC()+cpu->getInstructionSize(0),true); _dbg_update_(); Core_EnableStepping(false); MainWindow::UpdateMenus(); Sleep(1); ptr->gotoPC(); UpdateDialog(); } break; case IDC_STEPHLE: { hleDebugBreak(); SetDebugMode(false); _dbg_update_(); Core_EnableStepping(false); MainWindow::UpdateMenus(); } break; case IDC_STOP: { SetDebugMode(true); Core_EnableStepping(true); _dbg_update_(); MainWindow::UpdateMenus(); Sleep(1); //let cpu catch up ptr->gotoPC(); UpdateDialog(); vfpudlg->Update(); } break; case IDC_SKIP: { cpu->SetPC(cpu->GetPC() + cpu->getInstructionSize(0)); Sleep(1); ptr->gotoPC(); UpdateDialog(); } break; case IDC_ADDRESS: { if (HIWORD(wParam) == EN_CHANGE ) { char szBuffer[32]; GetWindowText ((HWND)lParam, szBuffer, 32); ptr->gotoAddr(parseHex(szBuffer)); UpdateDialog(); } } break; case IDC_UPDATECALLSTACK: { HWND hDlg = m_hDlg; HWND list = GetDlgItem(hDlg,IDC_CALLSTACK); ComboBox_ResetContent(list); u32 pc = currentMIPS->pc; u32 ra = currentMIPS->r[MIPS_REG_RA]; DWORD addr = Memory::ReadUnchecked_U32(pc); int count=1; ComboBox_SetItemData(list,ComboBox_AddString(list,symbolMap.GetDescription(pc)),pc); if (symbolMap.GetDescription(pc) != symbolMap.GetDescription(ra)) { ComboBox_SetItemData(list,ComboBox_AddString(list,symbolMap.GetDescription(ra)),ra); count++; } //walk the stack chain while (addr != 0xFFFFFFFF && addr!=0 && count++<20) { DWORD fun = Memory::ReadUnchecked_U32(addr+4); char *str = symbolMap.GetDescription(fun); if (strlen(str)==0) str = "(unknown)"; ComboBox_SetItemData(list, ComboBox_AddString(list,str), fun); addr = Memory::ReadUnchecked_U32(addr); } ComboBox_SetCurSel(list,0); } break; case IDC_GOTOPC: { ptr->gotoPC(); UpdateDialog(); } break; case IDC_GOTOLR: { ptr->gotoAddr(cpu->GetLR()); } break; case IDC_BACKWARDLINKS: { HWND box = GetDlgItem(m_hDlg, IDC_FUNCTIONLIST); int funcnum = symbolMap.GetSymbolNum(ListBox_GetItemData(box,ListBox_GetCurSel(box))); if (funcnum!=-1) symbolMap.FillListBoxBLinks(box,funcnum); break; } case IDC_ALLFUNCTIONS: { symbolMap.FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION); break; } default: return FALSE; } return TRUE; } case WM_USER+1: NotifyMapLoaded(); break; case WM_SIZE: { HWND disasm = GetDlgItem(m_hDlg, IDC_DISASMVIEW); HWND funclist = GetDlgItem(m_hDlg, IDC_FUNCTIONLIST); HWND regList = GetDlgItem(m_hDlg, IDC_REGLIST); int wf = regRect.right-regRect.left; int top = 138; MoveWindow(regList,8,top,wf,HIWORD(lParam)-top-8,TRUE); MoveWindow(funclist,8,top,wf,HIWORD(lParam)-top-8,TRUE); int w = LOWORD(lParam)-wf; top = 25; MoveWindow(disasm,wf+15,top, w-20,HIWORD(lParam)-top-8,TRUE); return TRUE; } case WM_GETMINMAXINFO: { MINMAXINFO *m = (MINMAXINFO *)lParam; m->ptMinTrackSize.x=minRect.right-minRect.left; //m->ptMaxTrackSize.x=m->ptMinTrackSize.x; m->ptMinTrackSize.y=minRect.bottom-minRect.top; } return TRUE; case WM_CLOSE: Show(false); return TRUE; } return FALSE; }
bool CLayerDlg::InitProc(HWND hWnd) { pMap->GetLayerInfo(curdata,curlayer); UpdateDialog(hWnd); return true; }
BOOL CTilePropertiesDialog::OnInitDialog() { UpdateDialog(); return TRUE; }
//----------------------------------------------------------------------------- //! //----------------------------------------------------------------------------- void tCurrentInfoDialog::OnCalendarInput() { m_pUpdateTimer->stop(); m_ActiveDate = m_pDateLineEdit->Date(); UpdateDialog(); }
// -------------------------------------------------------------------------- //! // -------------------------------------------------------------------------- tCurrentInfoDialog::tCurrentInfoDialog( tAt5CurrentsQuickInfoObject* pAt5Obj, QWidget* pParent ) : tDialog( tDialog::Full, pParent ), m_pDateLineEdit( NULL ), m_pDateLabel( NULL ), m_pCurrentInfoObj( pAt5Obj ) { setWindowTitle( tr("Currents") + " - " + pAt5Obj->Name() ); QGridLayout* pLayout = new QGridLayout(); SoftKeyBar()->ExplicitHide(); m_ActiveDate = QDate::currentDate(); if ( tUiConfig::Instance()->CanSupportTouch() ) { QHBoxLayout* pDateLayout = new QHBoxLayout(); tPushButton* pPreviousDayButton = new tPushButton( style()->standardIcon( QStyle::SP_ArrowLeft ), "", this ); pPreviousDayButton->setFixedWidth( style()->pixelMetric( NPM( tNOSStyle::NPM_DatePickerPrevNextButtonWidth ) ) ); pPreviousDayButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); pPreviousDayButton->setFocusPolicy( Qt::NoFocus ); Connect( pPreviousDayButton, SIGNAL( clicked() ), this, SLOT( OnPreviousDay() ) ); pDateLayout->addWidget( pPreviousDayButton ); m_pDateLineEdit = new tDateLineEdit( m_ActiveDate, tSystemSettings::Instance()->DateFormatString(), this ); m_pDateLineEdit->SetTitle( tr("Tide Date") ); m_pDateLineEdit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); m_pDateLineEdit->setFocusPolicy( Qt::NoFocus ); Connect( m_pDateLineEdit, SIGNAL( ValueChanged() ), this, SLOT( OnCalendarInput() ) ); pDateLayout->addWidget( m_pDateLineEdit ); tPushButton* pNextDayButton = new tPushButton( style()->standardIcon( QStyle::SP_ArrowRight ), "", this ); pNextDayButton->setFixedWidth( style()->pixelMetric( NPM( tNOSStyle::NPM_DatePickerPrevNextButtonWidth ) ) ); pNextDayButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); pNextDayButton->setFocusPolicy( Qt::NoFocus ); Connect( pNextDayButton, SIGNAL( clicked() ), this, SLOT( OnNextDay() ) ); pDateLayout->addWidget( pNextDayButton ); pLayout->addLayout( pDateLayout, 0, 0, 1, 3, Qt::AlignCenter ); } else { // Add date time label m_pDateLabel = new QLabel( m_ActiveDate.toString( tSystemSettings::Instance()->DateFormatString() ) ); pLayout->addWidget( m_pDateLabel, 0, 0 ); QSize arrowSize(14,14); QLabel* pPreviousDayArrow = new QLabel( this ); pPreviousDayArrow->setPixmap( style()->standardIcon(QStyle::SP_ArrowUp).pixmap(arrowSize) ); pPreviousDayArrow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); pPreviousDayArrow->setMaximumSize( arrowSize ); QLabel* pNextDayArrow = new QLabel( this ); pNextDayArrow->setPixmap( style()->standardIcon(QStyle::SP_ArrowDown).pixmap(arrowSize) ); pNextDayArrow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); pNextDayArrow->setMaximumSize( arrowSize ); QLabel* pPreviousDayLabel = new QLabel( this ); pPreviousDayLabel->setText( tr("Previous day") ); QLabel* pNextDayLabel = new QLabel( this ); pNextDayLabel->setText( tr("Next day") ); pLayout->addWidget( pPreviousDayArrow, 0, 2 ); pLayout->addWidget( pNextDayArrow, 2, 2 ); pLayout->addWidget( pPreviousDayLabel, 0, 1, Qt::AlignRight ); pLayout->addWidget( pNextDayLabel, 2, 1, Qt::AlignRight ); } m_pGraph = new tCurrentGraph( this ); m_pGraph->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); m_pGraph->installEventFilter( this ); Connect( m_pGraph, SIGNAL( NextPrevDay( bool ) ), this, SLOT( OnNextPrevDay( bool ) ) ); pLayout->addWidget( m_pGraph, 1, 0, 1, 3 ); setLayout( pLayout ); // Start the update timer m_pUpdateTimer = new QTimer( this ); m_pUpdateTimer->setSingleShot( false ); m_pUpdateTimer->setInterval( 60 * 1000 ); // x * 1000 ms = x seconds Connect( m_pUpdateTimer, SIGNAL( timeout() ), this, SLOT( OnUpdateTimer() ) ); m_pUpdateTimer->start(); // Initial update UpdateDialog(); }
void Debugger_Disasm::on_Address_textChanged(const QString &arg1) { CtrlDisAsmView *ptr = ui->DisasmView; ptr->gotoAddr(parseHex(ui->Address->text().toStdString().c_str())); UpdateDialog(); }
void Debugger_Disasm::Update() { ui->RegList->redraw(); mainWindow->updateMenus(); UpdateDialog(); }
void CRandomPropertyDialog::OnTypeChoiceChanged(wxCommandEvent& event) { UpdateDialog((ENewRandomValueType)event.GetSelection()); }
BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) { //if (!m_hDlg) return FALSE; switch(message) { case WM_INITDIALOG: { return TRUE; } break; case WM_TIMER: { int iPage = TabCtrl_GetCurSel (GetDlgItem(m_hDlg, IDC_LEFTTABS)); ShowWindow(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), iPage?SW_NORMAL:SW_HIDE); ShowWindow(GetDlgItem(m_hDlg, IDC_REGLIST), iPage?SW_HIDE:SW_NORMAL); } break; case WM_NOTIFY: switch (wParam) { case IDC_LEFTTABS: { HWND tabs = GetDlgItem(m_hDlg, IDC_LEFTTABS); NMHDR* pNotifyMessage = NULL; pNotifyMessage = (LPNMHDR)lParam; if (pNotifyMessage->hwndFrom == tabs) { int iPage = TabCtrl_GetCurSel (tabs); ShowWindow(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), iPage?SW_NORMAL:SW_HIDE); ShowWindow(GetDlgItem(m_hDlg, IDC_REGLIST), iPage?SW_HIDE:SW_NORMAL); } } break; case IDC_BREAKPOINTLIST: breakpointList->handleNotify(lParam); break; case IDC_THREADLIST: threadList->handleNotify(lParam); break; case IDC_STACKFRAMES: stackTraceView->handleNotify(lParam); break; } break; case WM_COMMAND: { CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); CtrlRegisterList *reglist = CtrlRegisterList::getFrom(GetDlgItem(m_hDlg,IDC_REGLIST)); switch(LOWORD(wParam)) { case ID_TOGGLE_PAUSE: SendMessage(MainWindow::GetHWND(),WM_COMMAND,ID_TOGGLE_PAUSE,0); break; case ID_DEBUG_DISPLAYMEMVIEW: changeSubWindow(SUBWIN_MEM); break; case ID_DEBUG_DISPLAYBREAKPOINTLIST: changeSubWindow(SUBWIN_BREAKPOINT); break; case ID_DEBUG_DISPLAYTHREADLIST: changeSubWindow(SUBWIN_THREADS); break; case ID_DEBUG_DISPLAYSTACKFRAMELIST: changeSubWindow(SUBWIN_STACKFRAMES); break; case ID_DEBUG_DSIPLAYREGISTERLIST: TabCtrl_SetCurSel(GetDlgItem(m_hDlg, IDC_LEFTTABS),0); ShowWindow(GetDlgItem(m_hDlg, IDC_REGLIST), SW_NORMAL); ShowWindow(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), SW_HIDE); break; case ID_DEBUG_DSIPLAYFUNCTIONLIST: TabCtrl_SetCurSel(GetDlgItem(m_hDlg, IDC_LEFTTABS),1); ShowWindow(GetDlgItem(m_hDlg, IDC_REGLIST), SW_HIDE); ShowWindow(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), SW_NORMAL); break; case ID_DEBUG_ADDBREAKPOINT: { keepStatusBarText = true; bool isRunning = Core_IsActive(); if (isRunning) { SetDebugMode(true); Core_EnableStepping(true); Core_WaitInactive(200); } BreakpointWindow bpw(m_hDlg,cpu); if (bpw.exec()) bpw.addBreakpoint(); if (isRunning) { SetDebugMode(false); Core_EnableStepping(false); } keepStatusBarText = false; } break; case ID_DEBUG_STEPOVER: if (GetFocus() == GetDlgItem(m_hDlg,IDC_DISASMVIEW)) stepOver(); break; case ID_DEBUG_STEPINTO: if (GetFocus() == GetDlgItem(m_hDlg,IDC_DISASMVIEW)) stepInto(); break; case ID_DEBUG_RUNTOLINE: if (GetFocus() == GetDlgItem(m_hDlg,IDC_DISASMVIEW)) runToLine(); break; case ID_DEBUG_STEPOUT: if (GetFocus() == GetDlgItem(m_hDlg,IDC_DISASMVIEW)) stepOut(); break; case IDC_SHOWVFPU: vfpudlg->Show(true); break; case IDC_FUNCTIONLIST: switch (HIWORD(wParam)) { case CBN_DBLCLK: { HWND lb = GetDlgItem(m_hDlg,LOWORD(wParam)); int n = ListBox_GetCurSel(lb); if (n!=-1) { unsigned int addr = (unsigned int)ListBox_GetItemData(lb,n); ptr->gotoAddr(addr); SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW)); } } break; }; break; case IDC_GOTOINT: switch (HIWORD(wParam)) { case LBN_SELCHANGE: { HWND lb =GetDlgItem(m_hDlg,LOWORD(wParam)); int n = ComboBox_GetCurSel(lb); unsigned int addr = (unsigned int)ComboBox_GetItemData(lb,n); if (addr != 0xFFFFFFFF) { ptr->gotoAddr(addr); SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW)); } } break; }; break; case IDC_STOPGO: { if (!Core_IsStepping()) // stop { ptr->setDontRedraw(false); SetDebugMode(true); Core_EnableStepping(true); _dbg_update_(); Sleep(1); //let cpu catch up ptr->gotoPC(); UpdateDialog(); vfpudlg->Update(); } else { // go lastTicks = CoreTiming::GetTicks(); // If the current PC is on a breakpoint, the user doesn't want to do nothing. CBreakPoints::SetSkipFirst(currentMIPS->pc); SetDebugMode(false); Core_EnableStepping(false); } } break; case IDC_STEP: stepInto(); break; case IDC_STEPOVER: stepOver(); break; case IDC_STEPOUT: stepOut(); break; case IDC_STEPHLE: { if (Core_IsActive()) break; lastTicks = CoreTiming::GetTicks(); // If the current PC is on a breakpoint, the user doesn't want to do nothing. CBreakPoints::SetSkipFirst(currentMIPS->pc); hleDebugBreak(); SetDebugMode(false); _dbg_update_(); Core_EnableStepping(false); } break; case IDC_MEMCHECK: SendMessage(m_hDlg,WM_COMMAND,ID_DEBUG_ADDBREAKPOINT,0); break; case IDC_UPDATECALLSTACK: { HWND hDlg = m_hDlg; HWND list = GetDlgItem(hDlg,IDC_CALLSTACK); ComboBox_ResetContent(list); u32 pc = currentMIPS->pc; u32 ra = currentMIPS->r[MIPS_REG_RA]; DWORD addr = Memory::ReadUnchecked_U32(pc); int count=1; ComboBox_SetItemData(list, ComboBox_AddString(list, ConvertUTF8ToWString(symbolMap.GetDescription(pc)).c_str()), pc); if (symbolMap.GetDescription(pc) != symbolMap.GetDescription(ra)) { ComboBox_SetItemData(list, ComboBox_AddString(list, ConvertUTF8ToWString(symbolMap.GetDescription(ra)).c_str()), ra); count++; } //walk the stack chain while (addr != 0xFFFFFFFF && addr!=0 && count++<20) { DWORD fun = Memory::ReadUnchecked_U32(addr+4); const wchar_t *str = ConvertUTF8ToWString(symbolMap.GetDescription(fun)).c_str(); if (wcslen(str) == 0) str = L"(unknown)"; ComboBox_SetItemData(list, ComboBox_AddString(list,str), fun); addr = Memory::ReadUnchecked_U32(addr); } ComboBox_SetCurSel(list,0); } break; case IDC_GOTOPC: { ptr->gotoPC(); SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW)); UpdateDialog(); } break; case IDC_GOTOLR: { ptr->gotoAddr(cpu->GetLR()); SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW)); } break; case IDC_BACKWARDLINKS: { HWND box = GetDlgItem(m_hDlg, IDC_FUNCTIONLIST); int funcnum = symbolMap.GetSymbolNum(ListBox_GetItemData(box,ListBox_GetCurSel(box))); if (funcnum!=-1) symbolMap.FillListBoxBLinks(box,funcnum); break; } case IDC_ALLFUNCTIONS: { symbolMap.FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION); break; } default: return FALSE; } return TRUE; } case WM_DEB_MAPLOADED: NotifyMapLoaded(); break; case WM_DEB_GOTOWPARAM: { CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); ptr->gotoAddr(wParam); SetFocus(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); break; } case WM_DEB_GOTOADDRESSEDIT: { wchar_t szBuffer[256]; CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); GetWindowText(GetDlgItem(m_hDlg,IDC_ADDRESS),szBuffer,256); u32 addr; if (parseExpression(ConvertWStringToUTF8(szBuffer).c_str(),cpu,addr) == false) { displayExpressionError(GetDlgItem(m_hDlg,IDC_ADDRESS)); } else { ptr->gotoAddr(addr); SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW)); } UpdateDialog(); } break; case WM_DEB_SETDEBUGLPARAM: SetDebugMode(lParam != 0); return TRUE; case WM_DEB_UPDATE: Update(); return TRUE; case WM_DEB_TABPRESSED: changeSubWindow(SUBWIN_NEXT); break; case WM_DEB_SETSTATUSBARTEXT: if (!keepStatusBarText) SendMessage(statusBarWnd,WM_SETTEXT,0,(LPARAM)ConvertUTF8ToWString((const char *)lParam).c_str()); break; case WM_DEB_GOTOHEXEDIT: { CtrlMemView *memory = CtrlMemView::getFrom(GetDlgItem(m_hDlg,IDC_DEBUGMEMVIEW)); memory->gotoAddr(wParam); // display the memory viewer too HWND bp = GetDlgItem(m_hDlg, IDC_BREAKPOINTLIST); HWND mem = GetDlgItem(m_hDlg, IDC_DEBUGMEMVIEW); HWND threads = GetDlgItem(m_hDlg, IDC_THREADLIST); ShowWindow(bp,SW_HIDE); ShowWindow(mem,SW_NORMAL); ShowWindow(threads,SW_HIDE); } break; case WM_SIZE: { UpdateSize(LOWORD(lParam), HIWORD(lParam)); SendMessage(statusBarWnd,WM_SIZE,0,10); SavePosition(); return TRUE; } case WM_MOVE: SavePosition(); break; case WM_GETMINMAXINFO: { MINMAXINFO *m = (MINMAXINFO *)lParam; // Reduce the minimum size slightly, so they can size it however they like. m->ptMinTrackSize.x = defaultRect.right - defaultRect.left - 100; //m->ptMaxTrackSize.x = m->ptMinTrackSize.x; m->ptMinTrackSize.y = defaultRect.bottom - defaultRect.top - 200; } return TRUE; case WM_CLOSE: Show(false); return TRUE; case WM_ACTIVATE: if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE) { g_debuggerActive = true; } else { g_debuggerActive = false; } break; } return FALSE; }
BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) { //if (!m_hDlg) return FALSE; switch(message) { case WM_INITDIALOG: { return TRUE; } break; case WM_TIMER: { int iPage = TabCtrl_GetCurSel (GetDlgItem(m_hDlg, IDC_LEFTTABS)); ShowWindow(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), iPage?SW_NORMAL:SW_HIDE); ShowWindow(GetDlgItem(m_hDlg, IDC_REGLIST), iPage?SW_HIDE:SW_NORMAL); } break; case WM_NOTIFY: switch (wParam) { case IDC_LEFTTABS: { HWND tabs = GetDlgItem(m_hDlg, IDC_LEFTTABS); NMHDR* pNotifyMessage = NULL; pNotifyMessage = (LPNMHDR)lParam; if (pNotifyMessage->hwndFrom == tabs) { int iPage = TabCtrl_GetCurSel (tabs); ShowWindow(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), iPage?SW_NORMAL:SW_HIDE); ShowWindow(GetDlgItem(m_hDlg, IDC_REGLIST), iPage?SW_HIDE:SW_NORMAL); } } break; case IDC_BREAKPOINTLIST: handleBreakpointNotify(lParam); break; case IDC_THREADLIST: threadList->handleNotify(lParam); break; } break; case WM_COMMAND: { CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); CtrlRegisterList *reglist = CtrlRegisterList::getFrom(GetDlgItem(m_hDlg,IDC_REGLIST)); switch(LOWORD(wParam)) { case IDC_SHOWVFPU: vfpudlg->Show(true); break; case IDC_FUNCTIONLIST: switch (HIWORD(wParam)) { case CBN_DBLCLK: { HWND lb = GetDlgItem(m_hDlg,LOWORD(wParam)); int n = ListBox_GetCurSel(lb); if (n!=-1) { unsigned int addr = (unsigned int)ListBox_GetItemData(lb,n); ptr->gotoAddr(addr); SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW)); } } break; }; break; case IDC_GOTOINT: switch (HIWORD(wParam)) { case LBN_SELCHANGE: { HWND lb =GetDlgItem(m_hDlg,LOWORD(wParam)); int n = ComboBox_GetCurSel(lb); unsigned int addr = (unsigned int)ComboBox_GetItemData(lb,n); if (addr != 0xFFFFFFFF) { ptr->gotoAddr(addr); SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW)); } } break; }; break; case IDC_GO: { lastTicks = CoreTiming::GetTicks(); // If the current PC is on a breakpoint, the user doesn't want to do nothing. CBreakPoints::SetSkipFirst(currentMIPS->pc); SetDebugMode(false); Core_EnableStepping(false); } break; case IDC_STEP: { if (Core_IsActive()) break; lastTicks = CoreTiming::GetTicks(); // If the current PC is on a breakpoint, the user doesn't want to do nothing. CBreakPoints::SetSkipFirst(currentMIPS->pc); Core_DoSingleStep(); Sleep(1); _dbg_update_(); ptr->gotoPC(); UpdateDialog(); vfpudlg->Update(); CtrlMemView::getFrom(GetDlgItem(m_hDlg,IDC_DEBUGMEMVIEW))->redraw(); threadList->reloadThreads(); updateThreadLabel(false); } break; case IDC_STEPOVER: { if (Core_IsActive()) break; lastTicks = CoreTiming::GetTicks(); // If the current PC is on a breakpoint, the user doesn't want to do nothing. CBreakPoints::SetSkipFirst(currentMIPS->pc); const char* dis = cpu->disasm(cpu->GetPC(),4); const char* pos = strstr(dis,"->$"); const char* reg = strstr(dis,"->"); ptr->setDontRedraw(true); u32 breakpointAddress = cpu->GetPC()+cpu->getInstructionSize(0); if (memcmp(dis,"jal\t",4) == 0 || memcmp(dis,"jalr\t",5) == 0) { // it's a function call with a delay slot - skip that too breakpointAddress += cpu->getInstructionSize(0); } else if (memcmp(dis,"j\t",2) == 0 || memcmp(dis,"b\t",2) == 0) { // in case of absolute branches, set the breakpoint at the branch target sscanf(pos+3,"%08x",&breakpointAddress); } else if (memcmp(dis,"jr\t",3) == 0) { // the same for jumps to registers int regNum = -1; for (int i = 0; i < 32; i++) { if (strcasecmp(reg+2,cpu->GetRegName(0,i)) == 0) { regNum = i; break; } } if (regNum == -1) break; breakpointAddress = cpu->GetRegValue(0,regNum); } else if (pos != NULL) { // get branch target sscanf(pos+3,"%08x",&breakpointAddress); CBreakPoints::AddBreakPoint(breakpointAddress,true); // also add a breakpoint after the delay slot breakpointAddress = cpu->GetPC()+2*cpu->getInstructionSize(0); } SetDebugMode(false); CBreakPoints::AddBreakPoint(breakpointAddress,true); _dbg_update_(); Core_EnableStepping(false); Sleep(1); ptr->gotoAddr(breakpointAddress); UpdateDialog(); } break; case IDC_STEPHLE: { if (Core_IsActive()) break; lastTicks = CoreTiming::GetTicks(); // If the current PC is on a breakpoint, the user doesn't want to do nothing. CBreakPoints::SetSkipFirst(currentMIPS->pc); hleDebugBreak(); SetDebugMode(false); _dbg_update_(); Core_EnableStepping(false); } break; case IDC_STOP: { ptr->setDontRedraw(false); SetDebugMode(true); Core_EnableStepping(true); _dbg_update_(); Sleep(1); //let cpu catch up ptr->gotoPC(); UpdateDialog(); vfpudlg->Update(); } break; case IDC_SKIP: { cpu->SetPC(cpu->GetPC() + cpu->getInstructionSize(0)); Sleep(1); ptr->gotoPC(); UpdateDialog(); } break; case IDC_MEMCHECK: { bool isRunning = Core_IsActive(); if (isRunning) { SetDebugMode(true); Core_EnableStepping(true); Core_WaitInactive(200); } BreakpointWindow bpw(m_hDlg,cpu); if (bpw.exec()) bpw.addBreakpoint(); if (isRunning) { SetDebugMode(false); Core_EnableStepping(false); } } break; case IDC_UPDATECALLSTACK: { HWND hDlg = m_hDlg; HWND list = GetDlgItem(hDlg,IDC_CALLSTACK); ComboBox_ResetContent(list); u32 pc = currentMIPS->pc; u32 ra = currentMIPS->r[MIPS_REG_RA]; DWORD addr = Memory::ReadUnchecked_U32(pc); int count=1; ComboBox_SetItemData(list,ComboBox_AddString(list,symbolMap.GetDescription(pc)),pc); if (symbolMap.GetDescription(pc) != symbolMap.GetDescription(ra)) { ComboBox_SetItemData(list,ComboBox_AddString(list,symbolMap.GetDescription(ra)),ra); count++; } //walk the stack chain while (addr != 0xFFFFFFFF && addr!=0 && count++<20) { DWORD fun = Memory::ReadUnchecked_U32(addr+4); const char *str = symbolMap.GetDescription(fun); if (strlen(str)==0) str = "(unknown)"; ComboBox_SetItemData(list, ComboBox_AddString(list,str), fun); addr = Memory::ReadUnchecked_U32(addr); } ComboBox_SetCurSel(list,0); } break; case IDC_GOTOPC: { ptr->gotoPC(); SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW)); UpdateDialog(); } break; case IDC_GOTOLR: { ptr->gotoAddr(cpu->GetLR()); SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW)); } break; case IDC_BACKWARDLINKS: { HWND box = GetDlgItem(m_hDlg, IDC_FUNCTIONLIST); int funcnum = symbolMap.GetSymbolNum(ListBox_GetItemData(box,ListBox_GetCurSel(box))); if (funcnum!=-1) symbolMap.FillListBoxBLinks(box,funcnum); break; } case IDC_ALLFUNCTIONS: { symbolMap.FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION); break; } default: return FALSE; } return TRUE; } case WM_DEB_MAPLOADED: NotifyMapLoaded(); break; case WM_DEB_RUNTOWPARAM: { lastTicks = CoreTiming::GetTicks(); CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); ptr->setDontRedraw(true); SetDebugMode(false); CBreakPoints::AddBreakPoint(wParam,true); _dbg_update_(); Core_EnableStepping(false); break; } case WM_DEB_GOTOWPARAM: { CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); ptr->gotoAddr(wParam); SetFocus(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); break; } case WM_DEB_GOTOBREAKPOINT: gotoBreakpointAddress(wParam); break; case WM_DEB_REMOVEBREAKPOINT: removeBreakpoint(wParam); break; case WM_DEB_GOTOADDRESSEDIT: { char szBuffer[256]; CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); GetWindowText(GetDlgItem(m_hDlg,IDC_ADDRESS),szBuffer,256); u32 addr; if (parseExpression(szBuffer,cpu,addr) == false) { displayExpressionError(GetDlgItem(m_hDlg,IDC_ADDRESS)); } else { ptr->gotoAddr(addr); SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW)); } UpdateDialog(); } break; case WM_DEB_SETDEBUGLPARAM: SetDebugMode(lParam != 0); return TRUE; case WM_DEB_UPDATE: Update(); return TRUE; case WM_DEB_TABPRESSED: { HWND bp = GetDlgItem(m_hDlg, IDC_BREAKPOINTLIST); HWND mem = GetDlgItem(m_hDlg, IDC_DEBUGMEMVIEW); HWND threads = GetDlgItem(m_hDlg, IDC_THREADLIST); if (IsWindowVisible(bp)) { ShowWindow(bp,SW_HIDE); ShowWindow(mem,SW_HIDE); ShowWindow(threads,SW_NORMAL); SetFocus(threads); } else if (IsWindowVisible(threads)) { ShowWindow(bp,SW_HIDE); ShowWindow(mem,SW_NORMAL); ShowWindow(threads,SW_HIDE); SetFocus(mem); } else { ShowWindow(bp,SW_NORMAL); ShowWindow(mem,SW_HIDE); ShowWindow(threads,SW_HIDE); SetFocus(bp); } } break; case WM_SIZE: { UpdateSize(LOWORD(lParam), HIWORD(lParam)); SavePosition(); return TRUE; } case WM_MOVE: SavePosition(); break; case WM_GETMINMAXINFO: { MINMAXINFO *m = (MINMAXINFO *)lParam; // Reduce the minimum size slightly, so they can size it however they like. m->ptMinTrackSize.x = defaultRect.right - defaultRect.left - 100; //m->ptMaxTrackSize.x = m->ptMinTrackSize.x; m->ptMinTrackSize.y = defaultRect.bottom - defaultRect.top - 200; } return TRUE; case WM_CLOSE: Show(false); return TRUE; } return FALSE; }
void CUpgradeDialog::OnSelchangeProductList() { UpdateDialog(); }
/** * called when the current regulator type is changed */ void OnRegTypeSelection( wxCommandEvent& event ) { UpdateDialog(); }
void CUpgradeDialog::OnOrderbymodem() { CString csReason; // Update the product items with the selection flags from the list box. m_ProductList.UpdateProductItems(); if (GetApp()->Offer()->CountProductFlags(PRODUCT_ITEM_Selected) == 0) { AfxMessageBox(IDS_NO_ITEMS_SELECTED_MODEM); return; } // Build an CInstallInfo structure for us to use. CInstallInfo Info; // Perform the modem search. CSearchingDialog SearchDialog(this); switch (SearchDialog.DoModal()) { case IDOK: { // User wants to send their order over the modem. int nPort = SearchDialog.m_nPort; long lSpeed = SearchDialog.m_lSpeed; BOOL fRetryRegister; int nPaymentMethod = 0; CString csCardNumber; CString csExpirationDate; do { fRetryRegister = FALSE; // Ask the user for some information. CRegistrationInformationDialog Dialog((UINT)-1, this); TRY { Dialog.m_fModemOrder = TRUE; Dialog.m_nPaymentMethod = nPaymentMethod; Dialog.m_csCardNumber = csCardNumber; Dialog.m_csExpirationDate = csExpirationDate; } END_TRY // We need to compute the various order totals so we can reflect them // in the order information dialog. long lTotal = 0; long lSubTotal = 0; TotalItems(&m_ProductList, lTotal); lSubTotal = lTotal; long lTax = m_TaxList.CurrentTax(lTotal); lTotal += lTax; long lShipping = lSubTotal > 0 ? Info.m_pOffer->ProcessingFee() : 0; lTotal += lShipping; // Fill in values used by RegInfo dialog. Dialog.m_lSubTotal = lSubTotal; Dialog.m_lTax = lTax; Dialog.m_lShipping = lShipping; Dialog.m_pOrderForm = this; if (Dialog.DoModal() == IDOK) { CMsregPacketHeader* pPacketHeader = NULL; CMsregPacketCatalogOrderRequest* pCatalogOrderData = NULL; CString csFileName; CFile cfFile; CString csWindowsDir; char* pTempName = NULL; BOOL fSuccess = FALSE; TRY { // Tax status may have changed, recompute some stuff. lTotal = lSubTotal; lTax = m_TaxList.CurrentTax(lTotal); lTotal += lTax; lShipping = lSubTotal > 0 ? Info.m_pOffer->ProcessingFee() : 0; lTotal += lShipping; nPaymentMethod = Dialog.m_nPaymentMethod; csCardNumber = Dialog.m_csCardNumber; csExpirationDate = Dialog.m_csExpirationDate; // Package the user's order into a packet. pCatalogOrderData = new CMsregPacketCatalogOrderRequest; // Product name. pCatalogOrderData->ProductName() = GetApp()->ApplicationName(); // Product version. pCatalogOrderData->AddField("Version", GetApp()->MsRegIniFile().GetString(MSREGINI_Section_Configuration, MSREGINI_Configuration_Version)); // Part Number. pCatalogOrderData->AddField("ParentPartNumber", GetApp()->MsRegIniFile().GetString(MSREGINI_Section_Configuration, MSREGINI_Configuration_ParentPartNumber)); // User information. pCatalogOrderData->AddField("FirstName", Dialog.m_csFirstName); pCatalogOrderData->AddField("LastName", Dialog.m_csLastName); pCatalogOrderData->AddField("Company", Dialog.m_csCompany); pCatalogOrderData->AddField("Title", ""); pCatalogOrderData->AddField("Address1", Dialog.m_csAddress1); pCatalogOrderData->AddField("Address2", Dialog.m_csAddress2); pCatalogOrderData->AddField("City", Dialog.m_csCity); pCatalogOrderData->AddField("State", Dialog.m_csState); pCatalogOrderData->AddField("Country", Dialog.m_csCountry); pCatalogOrderData->AddField("Zip", Dialog.m_csZip); pCatalogOrderData->AddField("Phone", Dialog.m_csPhone); pCatalogOrderData->AddField("Email", Dialog.m_csEmail); static char* PaymentMethodStrings[] = { "VSA", // Visa "MC", // MasterCard "AMX", // American Express "DIS" // Discover }; ASSERT((Dialog.m_nPaymentMethod >= 0) && (Dialog.m_nPaymentMethod < (sizeof(PaymentMethodStrings)/sizeof(PaymentMethodStrings[0])))); if ((Dialog.m_nPaymentMethod >= 0) && (Dialog.m_nPaymentMethod < (sizeof(PaymentMethodStrings)/sizeof(PaymentMethodStrings[0])))) { pCatalogOrderData->AddField("PaymentMethod", PaymentMethodStrings[Dialog.m_nPaymentMethod]); } pCatalogOrderData->AddField("CardNumber", Dialog.m_csCardNumber); pCatalogOrderData->AddField("ExpirationDate", Dialog.m_csExpirationDate); // Tax, shipping, and total. pCatalogOrderData->Tax() = (DWORD)lTax; pCatalogOrderData->Shipping() = (DWORD)lShipping; pCatalogOrderData->Total() = (DWORD)lTotal; // Offer codes. pCatalogOrderData->OfferCode() = Info.m_pOffer->OfferCode(); // Result codes. Info.GetLRCFromProducts(pCatalogOrderData->RequestCode()); // Line Items. AddCatalogOrderLineItems(pCatalogOrderData, Info.m_pOffer); // Build packet header. pPacketHeader = new CMsregPacketHeader; // Customer ID. pPacketHeader->CustomerId() = GetApp()->UserIniFile().GetString(MSREGUSRINI_Section_CustomerInfo, MSREGUSRINI_CustomerInfo_CustomerNumber); // Packet. pPacketHeader->AddPacket(pCatalogOrderData); pCatalogOrderData = NULL; // Get the Windows directory in case we need to create a // temporary file there. if (GetWindowsDirectory(csWindowsDir.GetBuffer(_MAX_PATH), _MAX_PATH) == 0) { csWindowsDir.Empty(); } else { csWindowsDir.ReleaseBuffer(); } // Create a temporary file name. pTempName = _tempnam((LPSTR)(LPCSTR)csWindowsDir, "REG"); if (pTempName != NULL) { // Delete the file csFileName = pTempName; free(pTempName); pTempName = NULL; if (cfFile.Open(csFileName, CFile::modeCreate|CFile::modeWrite|CFile::shareExclusive)) { // Write out the packet to the temp file. pPacketHeader->WriteToFile(cfFile); fSuccess = TRUE; } } } END_TRY // Clean up (fSuccess indicates whether we actually had success.) delete pPacketHeader; pPacketHeader = NULL; delete pCatalogOrderData; pCatalogOrderData = NULL; cfFile.Close(); if (pTempName != NULL) { free(pTempName); pTempName = NULL; } // If we were not successful, then it was because of some internal problem // such as running out of memory or not being able to create the file. // Put up a message and let the user try again if they want. if (!fSuccess) { AfxMessageBox(IDS_COULD_NOT_SAVE_INFORMATION); fRetryRegister = TRUE; } else { // Attempt to send the file to the receiver. CSendingDialog SendingDialog(nPort, lSpeed, csFileName, this); switch (SendingDialog.DoModal()) { case IDOK: { // The request was successfully transmitted, we should have // a response. Check if the order was successfully processed. DWORD dwResult = CMsregPacketCatalogOrderResponse::CATALOGORDERRESULT_Error; TRY { // Attempt to open the response file. if (!cfFile.Open(csFileName, CFile::modeRead|CFile::shareExclusive)) { AfxThrowUserException(); } // Read the response packet. pPacketHeader = new CMsregPacketHeader; pPacketHeader->ReadFromFile(cfFile); // Validate the response. CMsregPacketCatalogOrderResponse* pResponse; if ((pPacketHeader->Type() != CMsregPacket::BLOCK_PacketHeader) || (pPacketHeader->Version() != CMsregPacket::VERSION_PacketHeader) || (pPacketHeader->PacketCount() != 1) || ((pResponse = (CMsregPacketCatalogOrderResponse*)(pPacketHeader->GetPacket(0))) == NULL) || (pResponse->Type() != CMsregPacket::BLOCK_CatalogOrderResponse) || (pResponse->Version() != CMsregPacket::VERSION_CatalogOrderResponse)) { AfxThrowUserException(); } // Get the result. dwResult = pResponse->Result(); // Got a response, see if the order was successful. if (dwResult != CMsregPacketCatalogOrderResponse::CATALOGORDERRESULT_Ok) { AfxThrowUserException(); } // Remember their customer ID. GetApp()->UserIniFile().WriteString(MSREGUSRINI_Section_CustomerInfo, MSREGUSRINI_CustomerInfo_CustomerNumber, pPacketHeader->CustomerId()); // Remember that they're registered. GetApp()->UserIniFile().WriteInteger(GetApp()->ApplicationName(), MSREGUSRINI_Application_Registered, 1); // "Bonus Enable" them. GetApp()->UserIniFile().WriteString(GetApp()->ApplicationName(), MSREGUSRINI_Application_RegistrationCode, MODEM_REGISTRATION_CODE); // License the products (without confirming LAC). Info.LicenseSelectedProducts(); // Update the dialog to reflect the new state of the licensed products. CheckDlgButton(IDC_TAX_CHECK, GetApp()->UserNeedsTax()); m_ProductList.DisableLicensedItems(); UpdateDialog(); // Let the user play with their new toys. OnInstall(); } CATCH_ALL(e) { csReason.Empty(); // Some sort of error occurred, report it. switch (dwResult) { case CMsregPacketCatalogOrderResponse::CATALOGORDERRESULT_InvalidCreditCardNumber: { Util::SafeLoadString(IDS_INVALID_CREDIT_CARD_NUMBER, csReason); break; } case CMsregPacketCatalogOrderResponse::CATALOGORDERRESULT_CreditCardExpired: { Util::SafeLoadString(IDS_EXPIRED_CREDIT_CARD, csReason); break; } case CMsregPacketCatalogOrderResponse::CATALOGORDERRESULT_IncompleteCustomerInformation: { Util::SafeLoadString(IDS_INCOMPLETE_CUSTOMER_INFORMATION, csReason); break; } default: { Util::SafeLoadString(IDS_COULD_NOT_PROCESS, csReason); break; } } if (!csReason.IsEmpty()) { COrderFailedDialog Dialog(csReason, this); Dialog.DoModal(); } // Let the user try again. fRetryRegister = TRUE; } END_CATCH_ALL // Clean up. delete pPacketHeader; pPacketHeader = NULL; cfFile.Close(); break; } case IDCANCEL: { // They want to go back. Just go back to the register dialog. fRetryRegister = TRUE; break; } case IDABORT: { // Some sort of modem error occurred, report it. CCallFailedDialog Dialog(this); Dialog.DoModal(); fRetryRegister = TRUE; break; } default: { ASSERT(FALSE); break; } } } // Make sure we delete temporary file. TRY { CFile::Remove(csFileName); } END_TRY } } while (fRetryRegister); break; } case IDABORT: { // No modem was found, report this fact. CNoModemDialog Dialog(this); Dialog.DoModal(); break; } } // Make sure the dialog is up to date. UpdateDialog(); }
void EditFaceDataMod::SelectionChanged () { NotifyDependents(FOREVER, PART_SELECT, REFMSG_CHANGE); if (ip && editMod==this) UpdateDialog(); }
void InfoBox::OnReload() { UpdateDialog(); }
//====================>>> e2Dialog::DialogCommand <<<======================= void e2Dialog::DialogCommand(ItemVal id, ItemVal retval, CmdType ctype) { extern HInterfaceType VindexToInterfType(int vector, int index); // Dialog commands to here UserDebug2(CmdEvents,"e2Dialog::DialogCommand(id:%d, val:%d)\n", id, retval) vNoticeDialog note(this); switch (id) // We will do some things depending on value { case rdbComPort: case rdbLptPort: { if (retval) { int vector = id - rdbComPort; int index = vector ? GetValue(cbxInterfL) : GetValue(cbxInterf); interf_type = VindexToInterfType(vector, index); port_no = vector ? lpt_no : com_no; UpdateDialog(0, vector); // UpdateDialog(1); } break; } case rdbLpt1: case rdbLpt2: case rdbLpt3: { if (retval) lpt_no = port_no = id - rdbLpt1 + 1; break; } case rdbCom1: case rdbCom2: case rdbCom3: case rdbCom4: { if (retval) com_no = port_no = id - rdbCom1 + 1; break; } case cbxInterf: { interf_type = VindexToInterfType(0, retval); UpdateDialog(0, 0); break; } case cbxInterfL: { interf_type = VindexToInterfType(1, retval); UpdateDialog(0, 1); break; } //@V@:Case: btnTestDlg case btnTestDlg: { char str[MAXMSG]; if ( Test() ) strncpy(str, STR_MSGTEST " " STR_MSGFAILED, MAXMSG); else strncpy(str, STR_MSGTEST " " STR_MSGOK, MAXMSG); str[MAXMSG-1] = '\0'; note.Notice(str); break; } //@V@:EndCase // case btnCheckHw: // break; default: vModalDialog::DialogCommand(id,retval,ctype); break; } }