void VDUIJobControlDialog::OnJobQueueStatusChanged(VDJobQueueStatus status) { VDStringW title(mStandardCaption); if (status == kVDJQS_Running) title.append_sprintf(L" (%d remaining)", g_VDJobQueue.GetPendingJobCount()); if (g_VDJobQueue.IsAutoUpdateEnabled()) title.append_sprintf(L" [%s] (%hs:%d)", g_VDJobQueue.GetJobFilePath(), g_VDJobQueue.GetRunnerName(), (uint32)g_VDJobQueue.GetRunnerId()); switch(status) { case kVDJQS_Idle: EnableControl(IDC_START, true); SetControlText(IDC_START, L"Start"); EnableControl(IDC_ABORT, false); EnableControl(IDC_RELOAD, true); break; case kVDJQS_Running: SetControlText(IDC_START, L"Stop"); EnableControl(IDC_START, true); EnableControl(IDC_ABORT, true); EnableControl(IDC_RELOAD, false); break; case kVDJQS_Blocked: SetControlText(IDC_START, L"Start"); EnableControl(IDC_START, false); EnableControl(IDC_ABORT, false); EnableControl(IDC_RELOAD, false); break; } VDSetWindowTextW32(mhdlg, title.c_str()); }
VOID WINAPI WorkerThreadTogglePause( PCOMMONCONTEXT pcmnctx ) { if (pcmnctx->status == ACTIVE) { ResetEvent(pcmnctx->hUnpauseEvent); pcmnctx->status = PAUSED; if (!(pcmnctx->dwFlags & HCF_EXIT_PENDING)) { SetControlText(pcmnctx->hWnd, IDC_PAUSE, IDS_HC_RESUME); SetProgressBarPause(pcmnctx, PBST_PAUSED); } } else if (pcmnctx->status == PAUSED) { pcmnctx->status = ACTIVE; if (!(pcmnctx->dwFlags & HCF_EXIT_PENDING)) { SetControlText(pcmnctx->hWnd, IDC_PAUSE, IDS_HC_PAUSE); SetProgressBarPause(pcmnctx, PBST_NORMAL); } SetEvent(pcmnctx->hUnpauseEvent); } }
/* OnInitDone * ---------------------------------------------------------------------------- */ void CFolderDialog::OnInitDone() { HideControl(stc2); HideControl(cmb1); CWnd* pFD = GetParent(); LCID lcid = GetSystemDefaultLCID(); switch(PRIMARYLANGID(LANGIDFROMLCID(lcid))) { default: case LANG_ENGLISH: SetControlText(stc3, "Folder:"); SetControlText(IDOK, "&Select"); pFD->SetWindowText("Select Folder"); break; case LANG_GERMAN: SetControlText(stc3, "Verzeichnis:"); SetControlText(IDOK, "&Auswahl"); pFD->SetWindowText("Verzeichnis auswählen"); break; } SetControlText(edt1, m_sSelPath); CRect rStatic; pFD->GetDlgItem(stc3)->GetWindowRect(rStatic); pFD->ScreenToClient(rStatic); rStatic.right -= 10; pFD->GetDlgItem(stc3)->SetWindowPos(0, 0, 0, rStatic.Width(), rStatic.Height(), SWP_NOMOVE | SWP_NOZORDER); CRect rectCancel; pFD->GetDlgItem(IDCANCEL)->GetWindowRect(rectCancel); pFD->ScreenToClient(rectCancel); CRect rectOK; pFD->GetDlgItem(IDOK)->GetWindowRect(rectOK); pFD->ScreenToClient(rectOK); pFD->GetDlgItem(IDOK)->SetWindowPos(0,rectCancel.left - rectOK.Width() - 4, rectCancel.top, 0,0, SWP_NOZORDER | SWP_NOSIZE); CRect rList; pFD->GetDlgItem(lst1)->GetWindowRect(rList); pFD->ScreenToClient(rList); CRect rEdit; pFD->GetDlgItem(edt1)->GetWindowRect(rEdit); pFD->ScreenToClient(rEdit); rEdit.left = rStatic.right + 10; pFD->GetDlgItem(edt1)->SetWindowPos(0, rEdit.left, rEdit.top, rList.right - rEdit.left, rEdit.Height(), SWP_NOZORDER); m_fpWndProcDiag = (WNDPROC)SetWindowLong(pFD->m_hWnd, GWL_WNDPROC, (long)WindowProcDiag); m_fpWndProcEdit = (WNDPROC)SetWindowLong(pFD->GetDlgItem(edt1)->m_hWnd, GWL_WNDPROC, (long)WindowProcEdit); }
// // initialize about tab dialog // void OnInitDialog(HWND hDlg) { // Program name & version SetDlgItemText(hDlg, IDC_ABOUT_TITLE, VFD_PRODUCT_DESC); SetDlgItemText(hDlg, IDC_ABOUT_COPYRIGHT, VFD_COPYRIGHT_STR); // Web page URL SetControlText(hDlg, IDC_ABOUT_URL, MSG_ABOUT_URL); // Command line help SetControlText(hDlg, IDC_ABOUT_HELP, MSG_HELP_TEXT); }
LRESULT CHexFileDialog::OnPostInit(WPARAM wp, LPARAM lp) { // Set text of "OK" button if (!strOKName.IsEmpty()) SetControlText(IDOK, strOKName); // Restore the window position and size CRect rr(theApp.GetProfileInt("Window-Settings", strName+"X1", -30000), theApp.GetProfileInt("Window-Settings", strName+"Y1", -30000), theApp.GetProfileInt("Window-Settings", strName+"X2", -30000), theApp.GetProfileInt("Window-Settings", strName+"Y2", -30000)); if (rr.top != -30000) GetParent()->MoveWindow(&rr); // Note: there was a crash here until we set 8th // param of CFileDialog (bVistaStyle) c'tor to FALSE. // Restore the list view display mode (details, report, icons, etc) ASSERT(GetParent() != NULL); CWnd *psdv = FindWindowEx(GetParent()->m_hWnd, NULL, "SHELLDLL_DefView", NULL); if (psdv != NULL) { int mode = theApp.GetProfileInt("Window-Settings", strName+"Mode", REPORT); psdv->SendMessage(WM_COMMAND, mode, 0); } return 0; }
pascal OSStatus DirEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData) { DWORD srcChan=BASS_FX_TempoGetSource(chan); float dir; BASS_ChannelGetAttribute(srcChan, BASS_ATTRIB_REVERSE_DIR, &dir); if(dir<0){ BASS_ChannelSetAttribute(srcChan, BASS_ATTRIB_REVERSE_DIR, BASS_FX_RVS_FORWARD); SetControlText(16, "Playing Direction - Forward"); }else{ BASS_ChannelSetAttribute(srcChan, BASS_ATTRIB_REVERSE_DIR, BASS_FX_RVS_REVERSE); SetControlText(16,"Playing Direction - Reverse"); } return noErr; }
BOOL CPictureCatalogDialog::OnInitDialog() { CCustomOpenDlg::OnInitDialog(); SetControlText(1, "Print"); return TRUE; // return TRUE unless you set the focus to a control }
static void CPROC pause_pushed( uintptr_t psvPanel, PSI_CONTROL pc ) { struct media_control_panel *panel = ( struct media_control_panel *)psvPanel; if( panel->flags.playing ) { panel->flags.playing = 0; ffmpeg_PauseFile( panel->media->file ); SetControlText( panel->pause_button, WIDE( "Play" ) ); } else { panel->flags.playing = 1; ffmpeg_PlayFile( panel->media->file ); SetControlText( panel->pause_button, WIDE( "Pause" ) ); } }
BOOL CConfigurationDlg::OnInitDialog() { CDialogEx::OnInitDialog(); // create available device list. SetControlWinText(0); SetControlText(3202, 2) ; InstantDiCtrl * instantDiCtrl = AdxInstantDiCtrlCreate(); ICollection<DeviceTreeNode>* sptedDevices = instantDiCtrl->getSupportedDevices(); if (sptedDevices->getCount() == 0) { GetDlgItem(IDOK)->EnableWindow(FALSE); GetDlgItem(IDCANCEL)->EnableWindow(FALSE); AfxMessageBox(_T("No device to support the currently demonstrated function!")); return FALSE; }else{ for (int i = 0; i < sptedDevices->getCount(); ++i) { DeviceTreeNode const & node = sptedDevices->getItem(i); TRACE("%d, %s\n", node.DeviceNumber, node.Description); TCHAR des[MAX_DEVICE_DESC_LEN]; m_comboBox_Device.AddString(WCHAR_TO_TCHAR(node.Description,des)); m_comboBox_Device.SetItemData(i,node.DeviceNumber); } sptedDevices->Dispose(); } instantDiCtrl->Dispose(); m_comboBox_Device.SetCurSel(0); return TRUE; }
void CSelectFileDialog::OnInitDone(){ SetControlText(IDOK,_T("Ñ¡Ôñ")); }
/* OnFileNameChange * ---------------------------------------------------------------------------- */ void CFolderDialog::OnFileNameChange() { TCHAR szPath[MAX_PATH]; GetCurrentDirectory (MAX_PATH, szPath); m_sSelPath = CString(szPath); // get the list control CWnd *pParent = GetParent()->GetDlgItem(lst2); CListCtrl *pList = (CListCtrl *)pParent->GetDlgItem(1); // currently selected item int pos = pList->GetNextItem(-1, LVNI_ALL | LVNI_SELECTED); if (pos != -1) { // create the full path... CString sSel(pList->GetItemText(pos, 0)); CString sPath(szPath); if (m_sSelPath.GetAt(m_sSelPath.GetLength() - 1) == '\\') { sPath = CString (szPath) + sSel; } else { sPath = CString (szPath) + _T ( "\\" ) + sSel; } if (::IsDirectory(sPath)) m_sSelPath = sPath; } SetControlText(edt1, m_sSelPath); }
// =================================== void CMessageCentre::SetButtonDetailText // =================================== ( const char* pszText ) { SetControlText(IDC_BTN_DETAIL, pszText); }
// ==================================== void CMessageCentre::SetCurrentActionWord // ==================================== ( const char* pszActionword ) {//IDC_TXT_CURRENT_ACTIONWORD SetControlText(IDC_EDIT1, pszActionword); }
// ======================================= void CMessageCentre::SetNumberOfPassedChecks // ======================================= ( const char* pszPassedChecks ) { SetControlText(IDC_TXT_CHECKS_PASSED, pszPassedChecks); }
// ================================== void CMessageCentre::SetSuccessRateText // ================================== ( const char* pszText ) { SetControlText(IDC_TXTLBL_SUCCESS_RATE, pszText); }
// ================================= void CMessageCentre::SetNumberOfErrors // ================================= ( const char* pszErrors ) { SetControlText(IDC_TXT_ERRORS_FOUND, pszErrors); }
// ============================ void CMessageCentre::SetLastError // ============================ ( const char* pszLastError ) { SetControlText(IDC_TXT_ERROR, pszLastError); }
// ===================================== void CMessageCentre::SetNumberOfErrorsText // ===================================== ( const char* pszText ) { SetControlText(IDC_TXTLBL_ERRORS_FOUND, pszText); }
// ================================ void CMessageCentre::SetLastErrorText // ================================ ( const char* pszText ) { SetControlText(IDC_TXTLBL_LAST_ERROR, pszText); }
// ================================== void CMessageCentre::SetGroupErrorsText // ================================== ( const char* pszText ) { SetControlText(IDC_GRP_ERRORS, pszText); }
// ============================== void CMessageCentre::SetSuccessRate // ============================== ( const char* pszSuccesRate ) { SetControlText(IDC_TXT_SUCCESS_RATE, pszSuccesRate); }
// ================================= void CMessageCentre::SetButtonStopText // ================================= ( const char* pszText ) { SetControlText(IDC_BTN_STOP, pszText); }
// ================================== void CMessageCentre::SetButtonPauseText // ================================== ( const char* pszText ) { SetControlText(IDC_BTN_PAUSE, pszText); }
// ====================================== void CMessageCentre::SetNumberOfActionWords // ====================================== ( const char* pszActionWords ) { SetControlText(IDC_TXT_NUMBER_ACTIONWORDS, pszActionWords); }
// ======================================= void CMessageCentre::SetNumberOfFailedChecks // ======================================= ( const char* pszFailedChecks ) { SetControlText(IDC_TXT_CHECKS_FAILED, pszFailedChecks); }
// ========================== void CMessageCentre::SetMessage // ========================== ( const char* pszMessage ) { SetControlText(IDC_TXT_MESSAGE, pszMessage); }
// ======================================== void CMessageCentre::SetCurrentActionWordText // ======================================== ( const char* pszText ) { SetControlText(IDC_TXTLBL_CURRENT_ACTIONWORD, pszText); }
// ============================== void CMessageCentre::SetMessageText // ============================== ( const char* pszText ) { SetControlText(IDC_TXTLBL_MESSAGE, pszText); }
// ================================== void CMessageCentre::SetGroupChecksText // ================================== ( const char* pszText ) { SetControlText(IDC_GRP_CHECKS, pszText); }
// Sets the key/mouse info for a control at a specific index void CScreenConfigure::SetControlText(int nType, int nIndex) { CLTGUICtrl *pCtrl = m_pList[nType]->GetControl(nIndex+1); if (pCtrl) { SetControlText(pCtrl); } }