//--------------------------------------------------------------------- void __fastcall TConsoleDialog::SetTerminal(TTerminal * value) { if (FTerminal != value) { if (FTerminal) { if (FClearExceptionOnFail) { FTerminal->ExceptionOnFail = false; FClearExceptionOnFail = false; } assert(FTerminal->OnClose == TerminalClose); FTerminal->OnClose = FPrevTerminalClose; assert(FTerminal->OnChangeDirectory == DoChangeDirectory); FTerminal->OnChangeDirectory = FOldChangeDirectory; FOldChangeDirectory = NULL; if (FDirectoryChanged) { FDirectoryChanged = false; if (FTerminal->Active) { // directory would be read from EndTransaction anyway, // but with reload only flag set, what prevents // recording path in history, what we want if the path was // changed by "cd" command in console FTerminal->ReadDirectory(false); } } FTerminal->EndTransaction(); } FTerminal = value; if (FTerminal) { OutputMemo->Clear(); FOldChangeDirectory = FTerminal->OnChangeDirectory; FTerminal->OnChangeDirectory = DoChangeDirectory; // avoid reloading directory after each change of current directory from console FTerminal->BeginTransaction(); FLastTerminal = FTerminal; FPrevTerminalClose = FTerminal->OnClose; // used instead of previous TTerminalManager::OnChangeTerminal FTerminal->OnClose = TerminalClose; } UpdateControls(); } }
//--------------------------------------------------------------------------- void __fastcall TCopyDialog::LocalDirectoryBrowseButtonClick( TObject * /*Sender*/) { assert(!FToRemote); UnicodeString ADirectory; // if we are duplicating, we have remote path there if (!RemotePaths()) { ADirectory = Directory; } if (SelectDirectory(ADirectory, LoadStr(SELECT_LOCAL_DIRECTORY), true)) { Directory = ADirectory; UpdateControls(); } }
//设置用户 VOID CUserInfoView::SetUserViewInfo(tagUserData const* pCurrentUserData) { //设置用户 if (m_pCurrentUserData!=pCurrentUserData) { //设置变量 m_pCurrentUserData=pCurrentUserData; //更新界面 if (m_hWnd!=NULL) Invalidate(FALSE); } //更新控件 UpdateControls(); return; }
void FIFOPlayerWindow::OnFIFOLoaded() { FifoDataFile* file = FifoPlayer::GetInstance().GetFile(); auto object_count = FifoPlayer::GetInstance().GetFrameObjectCount(); auto frame_count = file->GetFrameCount(); m_frame_range_to->setMaximum(frame_count); m_object_range_to->setMaximum(object_count); m_frame_range_to->setValue(frame_count); m_object_range_to->setValue(object_count); UpdateInfo(); UpdateLimits(); UpdateControls(); }
/** Appends a String to the current Text */ int TextArea::AppendText(const char* text, int pos) { int ret = 0; if (pos >= ( int ) lines.size()) { return -1; } int newlen = ( int ) strlen( text ); if (pos == -1) { const char *note = NULL; if (note_const) { note = strstr(text,note_const); } char *str; if (NULL == note) { str = (char *) malloc( newlen +1 ); memcpy(str, text, newlen+1); } else { unsigned int notepos = (unsigned int) (note - text); str = (char *) malloc( newlen + CRAPLENGTH+1 ); memcpy(str,text,notepos); memcpy(str+notepos,inserted_crap,CRAPLENGTH); memcpy(str+notepos+CRAPLENGTH, text+notepos, newlen-notepos+1); } lines.push_back( str ); lrows.push_back( 0 ); ret =(int) (lines.size() - 1); } else { int mylen = ( int ) strlen( lines[pos] ); lines[pos] = (char *) realloc( lines[pos], mylen + newlen + 1 ); memcpy( lines[pos]+mylen, text, newlen + 1 ); ret = pos; } //if the textarea is not a listbox, then discard scrolled out //lines if (Flags&IE_GUI_TEXTAREA_HISTORY) { DiscardLines(); } UpdateControls(); return ret; }
bool emAvFileControlPanel::Cycle() { bool busy; busy=emTkGroup::Cycle(); if ( IsSignaled(Mdl->GetInfoSignal()) || IsSignaled(Mdl->GetPlayStateSignal()) || IsSignaled(Mdl->GetAdjustmentSignal()) ) { UpdateControls(); } if (IsSignaled(Mdl->GetPlayPosSignal())) { SfPlayPos->SetValue(Mdl->GetPlayPos()); } if (IsSignaled(SfPlayPos->GetValueSignal())) { Mdl->SetPlayPos(SfPlayPos->GetValue()); } if (IsSignaled(RgPlayState->GetCheckSignal())) { if (RbStop->IsChecked()) Mdl->Stop(); else if (RbPause->IsChecked()) Mdl->Pause(); else if (RbPlay->IsChecked()) Mdl->Play(); else if (RbSlow->IsChecked()) Mdl->PlaySlow(); else if (RbFast->IsChecked()) Mdl->PlayFast(); } if (IsSignaled(CbAudioMute->GetCheckSignal())) { Mdl->SetAudioMute(CbAudioMute->IsChecked()); } if (IsSignaled(SfAudioVolume->GetValueSignal())) { Mdl->SetAudioVolume(SfAudioVolume->GetValue()); } if (IsSignaled(SfAudioVisu->GetValueSignal())) { Mdl->SetAudioVisu(SfAudioVisu->GetValue()); } if (IsSignaled(SfAudioChannel->GetValueSignal())) { Mdl->SetAudioChannel(SfAudioChannel->GetValue()); } if (IsSignaled(SfSpuChannel->GetValueSignal())) { Mdl->SetSpuChannel(SfSpuChannel->GetValue()); } return busy; }
BOOL CListViewSearchDlg::OnInitDialog() { CDialog::OnInitDialog(); SetIcon(m_icnWnd = theApp.LoadIcon(_T("Search")), FALSE); InitWindowStyles(this); SetWindowText(GetResString(IDS_SW_SEARCHBOX)); SetDlgItemText(IDC_LISTVIEW_SEARCH_TEXT_LBL, GetResString(IDS_SEARCH_TEXT) + _T(':')); SetDlgItemText(IDC_LISTVIEW_SEARCH_COLUMN_LBL, GetResString(IDS_SEARCH_COLUMN) + _T(':')); SetDlgItemText(IDCANCEL, GetResString(IDS_CANCEL)); GetDlgItem(IDOK)->SetWindowText(GetResString(IDS_TREEOPTIONS_OK)); if (!m_bCanSearchInAllColumns) m_iSearchColumn = 0; if (m_pListView != NULL) { TCHAR szColTitle[256]; LVCOLUMN lvc; lvc.mask = LVCF_TEXT; lvc.cchTextMax = sizeof(szColTitle)/sizeof(szColTitle[0]); lvc.pszText = szColTitle; int iCol = 0; while (m_pListView->GetColumn(iCol++, &lvc)) { m_ctlSearchCol.AddString(lvc.pszText); if (!m_bCanSearchInAllColumns) break; } if ((UINT)m_iSearchColumn >= (UINT)m_ctlSearchCol.GetCount()) m_iSearchColumn = 0; } else { m_ctlSearchCol.EnableWindow(FALSE); m_ctlSearchCol.ShowWindow(SW_HIDE); m_iSearchColumn = 0; } m_ctlSearchCol.SetCurSel(m_iSearchColumn); UpdateControls(); return TRUE; }
uint32 CMenuPlayer::OnCommand(uint32 nCommand, uint32 nParam1, uint32 nParam2) { if (m_Popup.m_bWaitForUpdate) { if (nCommand == MC_UPDATE) { m_Popup.m_bWaitForUpdate = LTFALSE; // g_pInterfaceMgr->GetMenuMgr()->HideSubMenu(true); UpdateControls(); } return 1; } if (nCommand == MC_UPGRADE && m_Upgrade.IsEnabled()) { CAutoMessage cMsg; cMsg.Writeuint8(MID_PLAYER_SKILLS); cMsg.Writeuint8((uint8)g_nSkill); g_pLTClient->SendToServer(cMsg.Read(), MESSAGE_GUARANTEED); m_Popup.m_bWaitForUpdate = LTTRUE; // Play upgrade sound... g_pClientSoundMgr->PlayInterfaceSound("Interface\\Snd\\upgraded_skill.wav"); } else if (nCommand >= MC_CUSTOM) { g_nSkill = nCommand - MC_CUSTOM; UpdatePopup(); m_Points.SetString(FormatTempString(IDS_SKILL_AVAIL,g_pPlayerStats->GetAvailSkillPoints())); m_Popup.ClearSelection(); m_Popup.PreviousSelection(); UpdateModText(true); g_pInterfaceMgr->GetMenuMgr()->ShowSubMenu(&m_Popup); } else { return CBaseMenu::OnCommand(nCommand,nParam1,nParam2); } return 1; }
//--------------------------------------------------------------------------- void __fastcall TCopyDialog::CopyParamClick(TObject * Sender) { TCopyParamType Param = Params; bool PrevSaveSettings = FSaveSettings; if (CopyParamListPopupClick(Sender, Param, FPreset, FCopyParamAttrs, &FSaveSettings)) { Params = Param; } else { UpdateControls(); } if (PrevSaveSettings && !FSaveSettings) { NeverShowAgainCheck->Checked = false; } }
//--------------------------------------------------------------------------- void __fastcall TLogForm::SetSessionLog(TSessionLog * value) { if (FSessionLog != value) { if (SessionLog) { assert(SessionLog->OnStateChange == SessionLogStateChange); SessionLog->OnStateChange = NULL; } FSessionLog = value; if (SessionLog) { assert(SessionLog->OnStateChange == NULL); SessionLog->OnStateChange = SessionLogStateChange; } UpdateControls(); } }
// CFileOpenDlg::OnClickFileList // // The user clicked the file list // void CFileOpenDlg::OnClickFileList(NMHDR* pNMHDR, LRESULT* pResult) { int iItem; iItem = m_listFile.GetNextItem(-1, LVNI_SELECTED); if(iItem != -1) { m_strFile = m_listFile.GetItemText(iItem, 0); } // // Enable or disable the OK button // m_bOk = iItem != -1; UpdateControls(); *pResult = 0; }
bool wxGenericFileDialog::Show( bool show ) { // Called by ShowModal, so don't repeate the update #ifndef __WIN32__ if (show) { #ifdef __WXGTK__ m_list->SetDirectory(m_dir); #else m_list->GoToDir(m_dir); #endif UpdateControls(); m_text->SetValue(m_fileName); } #endif return wxDialog::Show( show ); }
bool CMatchingDlg::SelectFrame(int *frame_id) { m_FrameID = 0; gtk_widget_hide(m_UseFrame); ReadFrames(true, *frame_id); SetSelectMode(REFERENCE_FRAME); SetSortMode(m_FrameSort); UpdatePreview(true); UpdateControls(); if (gtk_dialog_run(GTK_DIALOG(m_pDlg))==GTK_RESPONSE_ACCEPT) { g_Project->SetInt("MatchingDlg", "Frame", m_FrameID); *frame_id = m_FrameID; return true; } return false; }
void ChannelCombinationInterface::__TargetImage_ViewSelected( ViewList& /*sender*/, View& view ) { for ( int i = 0; i < 3; ++i ) instance.channelId[i].Clear(); if ( !view.IsNull() ) { IsoString baseId = view.Id(); for ( int i = 0; i < 3; ++i ) { String suffix = String( '_' ) + ColorSpaceId::ChannelId( instance.colorSpace, i ); if ( !View::ViewById( baseId + suffix ).IsNull() ) instance.channelId[i] = baseId + suffix; } } UpdateControls(); }
bool B3EInterface::Launch( const MetaProcess& P, const ProcessImplementation*, bool& dynamic, unsigned& /*flags*/ ) { if ( GUI == 0 ) { GUI = new GUIData( *this ); #ifdef __PCL_WINDOWS // Windows doesn't support Unicode for standard UI fonts SetWindowTitle( "B3E (Ballesteros Blackbody Estimator)" ); #else const char16_type title[] = { 'B', '3', 0x2107, 0 }; SetWindowTitle( String( title ) + " (Ballesteros Blackbody Estimator)" ); #endif UpdateControls(); } dynamic = false; return &P == TheB3EProcess; }
//初始函数 BOOL CDlgCustomFace::OnInitDialog() { __super::OnInitDialog(); //创建刷子 m_brBkground.CreateSolidBrush(BGROUND_COLOR); //设置标题 SetWindowText(TEXT("自定义头像")); //更新控件 UpdateControls(); //初始化设置 __super::InitSkinObject(); return TRUE; }
bool HDRCompositionInterface::Launch( const MetaProcess& P, const ProcessImplementation*, bool& dynamic, unsigned& /*flags*/ ) { // ### Deferred initialization if ( GUI == 0 ) { GUI = new GUIData( *this ); SetWindowTitle( "HDRComposition" ); UpdateControls(); // Restore position only if ( !RestoreGeometry() ) SetDefaultPosition(); AdjustToContents(); } dynamic = false; return &P == TheHDRCompositionProcess; }
int FileDialog::ShowModal() { if (!m_buttonlabel.IsEmpty()) { wxButton *btn = new wxButton( this, ID_EXTRABUTTON, m_buttonlabel ); m_choicesizer->Insert( 1, btn, 0, wxCENTER | wxALL, 5 ); } ignoreChanges = true; m_list->GoToDir(m_dir); UpdateControls(); m_text->SetValue(m_fileName); ignoreChanges = false; return wxDialog::ShowModal(); }
BOOL CDirectDownloadDlg::OnInitDialog() { CResizableDialog::OnInitDialog(); InitWindowStyles(this); SetIcon(m_icnWnd = theApp.LoadIcon(_T("PasteLink")), FALSE); AddAnchor(IDC_DDOWN_FRM, TOP_LEFT, BOTTOM_RIGHT); AddAnchor(IDC_ELINK, TOP_LEFT, BOTTOM_RIGHT); AddAnchor(IDCANCEL, BOTTOM_RIGHT); AddAnchor(IDOK, BOTTOM_RIGHT); AddAnchor(IDC_CATLABEL, BOTTOM_LEFT); AddAnchor(IDC_CATS, BOTTOM_LEFT,BOTTOM_RIGHT); EnableSaveRestore(PREF_INI_SECTION); SetWindowText(GetResString(IDS_SW_DIRECTDOWNLOAD)); m_ctrlDirectDlFrm.SetWindowText(GetResString(IDS_SW_DIRECTDOWNLOAD)); m_ctrlDirectDlFrm.SetIcon(_T("Download")); GetDlgItem(IDOK)->SetWindowText(GetResString(IDS_DOWNLOAD)); GetDlgItem(IDC_FSTATIC2)->SetWindowText(GetResString(IDS_SW_LINK)); GetDlgItem(IDC_CATLABEL)->SetWindowText(GetResString(IDS_CAT)+_T(":")); GetDlgItem(IDOK)->SetWindowText(GetResString(IDS_DOWNLOAD)); GetDlgItem(IDCANCEL)->SetWindowText(GetResString(IDS_CANCEL)); if (thePrefs.GetCatCount()==0) { GetDlgItem(IDC_CATLABEL)->ShowWindow(SW_HIDE); GetDlgItem(IDC_CATS)->ShowWindow(SW_HIDE); } else { UpdateCatTabs(); if (theApp.m_fontSymbol.m_hObject){ GetDlgItem(IDC_CATLABEL)->SetFont(&theApp.m_fontSymbol); GetDlgItem(IDC_CATLABEL)->SetWindowText(GetExStyle() & WS_EX_LAYOUTRTL ? _T("3") : _T("4")); // show a right-arrow } } UpdateControls(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
void CPolyDlg::OnBtnDeleteCorner() { int selidx = m_Combo_Corner.GetCurSel() ; m_Combo_Corner.DeleteString( selidx ) ; if( m_Combo_Corner.GetCount() > 0 ) //12/02/01 bugfix { RenumberList( &m_Combo_Corner ) ; //set selection to item just before deleted one selidx-- ; m_Combo_Corner.SetCurSel( selidx ) ; } else //added 12/4/01 to clear the editbox for empty list { m_Combo_Corner.ResetContent() ; } UpdateControls() ; }
//--------------------------------------------------------------------------- void __fastcall TFileFindDialog::FileFound(TTerminal * /*Terminal*/, const UnicodeString FileName, const TRemoteFile * AFile, bool & Cancel) { TListItem * Item = FileView->Items->Add(); TRemoteFile * File = AFile->Duplicate(true); Item->Data = File; Item->ImageIndex = File->IconIndex; UnicodeString Caption = File->FileName; if (File->IsDirectory) { Caption = UnixIncludeTrailingBackslash(Caption); } Item->Caption = Caption; UnicodeString Directory = UnixExtractFilePath(File->FullFileName); if (AnsiSameText(FDirectory, Directory.SubString(1, FDirectory.Length()))) { Directory[1] = L'.'; Directory.Delete(2, FDirectory.Length() - 1); } else { assert(false); } Item->SubItems->Add(Directory); if (File->IsDirectory) { Item->SubItems->Add(L""); } else { Item->SubItems->Add( FormatBytes(File->Size, WinConfiguration->FormatSizeBytes, WinConfiguration->FormatSizeBytes)); } Item->SubItems->Add(UserModificationStr(File->Modification, File->ModificationFmt)); UpdateControls(); Cancel = (FState == ffAborting); Application->ProcessMessages(); }
//--------------------------------------------------------------------------- void __fastcall TRightsFrame::SetRights(const TRights & value) { bool Changed = (AllowUndef != value.AllowUndef); AllowUndef = true; // temporarily for (int Right = TRights::rrFirst; Right <= TRights::rrLast; Right++) { TRights::TRight R = static_cast<TRights::TRight>(Right); if (States[R] != value.RightUndef[R]) { States[R] = value.RightUndef[R]; Changed = true; } } AllowUndef = value.AllowUndef; if (Changed || !FInitialized) { UpdateControls(); } }
BOOL CGenericPropPage::OnInitDialog() { CPropertyPage::OnInitDialog(); // translate dialog resources g_language.InitDialogStrings( this, IDD ); ((CSpinButtonCtrl*)GetDlgItem(IDC_SPIN1))->SetRange( 1, 100 ); ((CSpinButtonCtrl*)GetDlgItem(IDC_SPIN2))->SetRange( 0, 100 ); ((CSpinButtonCtrl*)GetDlgItem(IDC_SPIN3))->SetRange( 0, 100 ); ((CSpinButtonCtrl*)GetDlgItem(IDC_SPIN4))->SetRange( 1, 100 ); CUStringConvert strCnv; m_tmpDir.SetWindowText( strCnv.ToT( g_config.GetTempDir() ) ); UpdateControls(); return TRUE; }
void B3EInterface::__ItemSelected( ComboBox& sender, int itemIndex ) { if ( sender == GUI->IntensityUnits_ComboBox ) { if ( ( instance.p_intensityUnits == 0 || instance.p_intensityUnits == 1 ) && (itemIndex == 2 || itemIndex == 3)) { instance.p_inputView[0].center = CLIGHT/instance.p_inputView[0].center; instance.p_inputView[1].center = CLIGHT/instance.p_inputView[1].center; instance.p_outputCenter = CLIGHT/instance.p_outputCenter; } if ( ( instance.p_intensityUnits == 2 || instance.p_intensityUnits == 3 ) && (itemIndex == 0 || itemIndex == 1)) { instance.p_inputView[0].center = CLIGHT/instance.p_inputView[0].center; instance.p_inputView[1].center = CLIGHT/instance.p_inputView[1].center; instance.p_outputCenter = CLIGHT/instance.p_outputCenter; } instance.p_intensityUnits = itemIndex; } else if ( sender == GUI->OutputImages_ComboBox ) { switch ( itemIndex ) { case SYNTHETIC_IMAGE: instance.p_syntheticImage = true; instance.p_thermalMap = false; break; case THERMAL_MAP: instance.p_syntheticImage = false; instance.p_thermalMap = true; break; case SYNTHETIC_AND_THERMAL: instance.p_syntheticImage = true; instance.p_thermalMap = true; break; default: // ?! throw Error( "B3EInterface: Internal error" ); break; } } UpdateControls(); }
void CNewFilesDlg::EditDirPath(void) { const gchar *dirname = gtk_entry_get_text(GTK_ENTRY(m_DirEdit)); GtkWidget *pPathDlg = gtk_file_chooser_dialog_new("Select path", GTK_WINDOW(m_pDlg), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CLOSE, GTK_RESPONSE_REJECT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_standard_tooltips(GTK_FILE_CHOOSER(pPathDlg)); if (dirname && g_file_test(dirname, G_FILE_TEST_IS_DIR)) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(pPathDlg), dirname); if (gtk_dialog_run(GTK_DIALOG(pPathDlg)) == GTK_RESPONSE_ACCEPT) { gchar *path = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(pPathDlg)); CConfig::SetStr("MakeCatDlg", "Folder", path); gtk_entry_set_text(GTK_ENTRY(m_DirEdit), path); g_free(path); UpdateControls(); } gtk_widget_destroy(pPathDlg); }
void ChannelExtractionInterface::__ColorSpace_Click( Button& sender, bool /*checked*/ ) { if ( sender == GUI->RGB_RadioButton ) instance.colorSpace = ColorSpaceId::RGB; else if ( sender == GUI->HSV_RadioButton ) instance.colorSpace = ColorSpaceId::HSV; else if ( sender == GUI->HSI_RadioButton ) instance.colorSpace = ColorSpaceId::HSI; else if ( sender == GUI->CIEXYZ_RadioButton ) instance.colorSpace = ColorSpaceId::CIEXYZ; else if ( sender == GUI->CIELab_RadioButton ) instance.colorSpace = ColorSpaceId::CIELab; else if ( sender == GUI->CIELch_RadioButton ) instance.colorSpace = ColorSpaceId::CIELch; instance.channelEnabled[0] = instance.channelEnabled[1] = instance.channelEnabled[2] = true; UpdateControls(); }
bool CGUIDialogMediaFilter::OnMessage(CGUIMessage& message) { switch (message.GetMessage()) { case GUI_MSG_CLICKED: { if (message.GetSenderId()== CONTROL_CLEAR_BUTTON) { m_filter->Reset(); m_filter->SetType(m_mediaType); for (std::map<std::string, Filter>::iterator filter = m_filters.begin(); filter != m_filters.end(); filter++) { filter->second.rule = NULL; filter->second.setting->Reset(); } TriggerFilter(); return true; } break; } case GUI_MSG_REFRESH_LIST: { TriggerFilter(); UpdateControls(); break; } case GUI_MSG_WINDOW_DEINIT: { Reset(); break; } default: break; } return CGUIDialogSettingsManualBase::OnMessage(message); }
LRESULT CDCSettings::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { USES_CONVERSION; AddStrings(m_hWnd, IDC_CAMERA_TYPE, g_rgszCameraTypes); AddStrings(m_hWnd, IDC_DEVICE, g_rgszDevices); AddStrings(m_hWnd, IDC_SPEED, g_rgszSpeeds); AddStrings(m_hWnd, IDC_RESIZE_MODE, g_rgszResizeModes); AddStrings(m_hWnd, IDC_STRETCH_MODE, g_rgszStretchModes); SendDlgItemMessage(IDC_CAMERA_TYPE, CB_SETCURSEL, (WPARAM)m_fCameraType - 1, 0); CComBSTR strDevice = m_strDevice; if(!strDevice.Length()) strDevice = g_szAutomatic; SetDlgItemText(IDC_DEVICE, OLE2T(strDevice)); if(m_nSpeed == 0) SetDlgItemText(IDC_SPEED, g_szAutomatic); else SetDlgItemInt(IDC_SPEED, m_nSpeed); SendDlgItemMessage(IDC_RESIZE_MODE, CB_SETCURSEL, (WPARAM)m_fResizeMode - 1, 0); SendDlgItemMessage(IDC_STRETCH_MODE, CB_SETCURSEL, (WPARAM)m_fStretchMode - 1, 0); SetDlgItemInt(IDC_DESIGN_WIDTH, m_cxDesignWidth); SetDlgItemInt(IDC_DESIGN_HEIGHT, m_cyDesignHeight); TCHAR szBuffer[1024]; // CComBSTR strModule = GetModuleFilePath(); // CComBSTR strVersion = GetFileVersion(OLE2CT(strModule)); CComBSTR strVersion = VER_FILEVERSION_STR; wsprintf(szBuffer, "Image Upload Version %s", OLE2CT(strVersion)); SetDlgItemText(IDC_VERSION, szBuffer); UpdateControls(); return 1; // Let the system set the focus }
//--------------------------------------------------------------------------- void __fastcall TRightsFrame::CycleRights(int Group) { TRights::TState State; bool Same = true; for (int Right = 0; Right < 3; Right++) { TRights::TState CState = States[static_cast<TRights::TRight>( TRights::rrUserRead + Right + ((Group - 1) * 3))]; if (Right == 0) State = CState; else if (State != CState) Same = False; } if (!Same) { State = TRights::rsYes; } else { switch (State) { case TRights::rsYes: State = TRights::rsNo; break; case TRights::rsNo: State = AllowUndef ? TRights::rsUndef : TRights::rsYes; break; case TRights::rsUndef: State = TRights::rsYes; break; } } for (int Right = 0; Right < 3; Right++) { States[static_cast<TRights::TRight>( TRights::rrUserRead + Right + ((Group - 1) * 3))] = State; } UpdateControls(); }
void CBoundingBoxDlg::OnOk(wxCommandEvent &event) { // read data from controls I1 lxrg, lyrg, lzrg; bool bSuccess = ReadDouble(xminbox, lxrg.lo) && ReadDouble(xmaxbox, lxrg.hi) && ReadDouble(yminbox, lyrg.lo) && ReadDouble(ymaxbox, lyrg.hi) && ReadDouble(zminbox, lzrg.lo) && ReadDouble(zmaxbox, lzrg.hi); if ((bSuccess) && (lxrg.lo <= lxrg.hi) && (lyrg.lo <= lyrg.hi) && (lzrg.lo <= lzrg.hi)) { Set(lxrg, lyrg, lzrg); // skip leaves the event to be handled by MainFrame event.Skip(); } UpdateControls(); }