HRESULT ConfigureSeekbar(IMediaSeeking *pMS, CSliderCtrl Seekbar, CStatic& strPosition, HWND hwndOwner) { HRESULT hr; // Disable seekbar for new file and reset tracker/position label Seekbar.SetPos(0); Seekbar.EnableWindow(FALSE); g_rtTotalTime=0; LANGID dwLanguageID = GetSystemLanguagePrimaryID(); switch (dwLanguageID) { case LANG_SPANISH : strPosition.SetWindowText(TEXT("Position: 00m:00s\0")); break; default: strPosition.SetWindowText(TEXT("Position: 00m:00s\0")); break; } DWORD dwSeekCaps = AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanGetDuration; // Can we seek this file? If so, enable trackbar. if (pMS && (S_OK == pMS->CheckCapabilities(&dwSeekCaps))) { hr = pMS->GetDuration(&g_rtTotalTime); Seekbar.EnableWindow(TRUE); } g_hwnd = hwndOwner; return hr; }
void COutputTabView::AddStatusListCtrl3() { LANGID dwLanguageID = GetSystemLanguagePrimaryID(); TCHAR buffer[16]; int iCount = m_listCtrl3.GetItemCount(); int iBufferSize = 16; CString strCount = _itot(iCount, buffer, 10); LPTSTR lpszCount = _T("0"); LVCOLUMN lvcol; switch(dwLanguageID) { case LANG_SPANISH: strCount = _T("Contenido *** ") + strCount + _T(" palabra(s) encontrada(s) de la búsqueda. ***"); lpszCount = strCount.GetBuffer(iBufferSize); lvcol.pszText = lpszCount; m_listCtrl3.SetColumn(7, &lvcol); break; default: strCount = _T("Content *** ")+ strCount + _T(" ocurrence(s) have been found. ***"); lpszCount = strCount.GetBuffer(iBufferSize); lvcol.pszText = lpszCount; m_listCtrl3.SetColumn(7, &lvcol); break; } }
void UpdatePosition(IMediaSeeking *pMS, REFERENCE_TIME rtNow, CStatic& strPosition) { HRESULT hr; // If no reference time was passed in, read the current position if (rtNow == 0) { // Read the current stream position hr = pMS->GetCurrentPosition(&rtNow); if (FAILED(hr)) return; } // Convert the LONGLONG duration into human-readable format unsigned long nTotalMS = (unsigned long) rtNow / 10000; // 100ns -> ms int nSeconds = nTotalMS / 1000; int nMinutes = nSeconds / 60; nSeconds %= 60; // Update the display TCHAR szPosition[32]; //Verify the system language configuration LANGID dwLanguageID = GetSystemLanguagePrimaryID(); switch (dwLanguageID) { case LANG_SPANISH : wsprintf(szPosition, _T("Position: %02dm:%02ds\0"), nMinutes, nSeconds); strPosition.SetWindowText(szPosition); break; default: wsprintf(szPosition, _T("Position: %02dm:%02ds\0"), nMinutes, nSeconds); strPosition.SetWindowText(szPosition); break; } }
void CNSChartBarCtrl::OnAdd() { LANGID dwLanguageID = GetSystemLanguagePrimaryID(); double dTemp; CNSChartDlg dlg ; switch( dwLanguageID ) { case LANG_SPANISH: dlg.m_strTask.Format(TEXT("A G R E G A R")) ; dlg.szBtnCaption = _T("Agregar"); dlg.szBtnCancel = _T("Cancelar"); break; default: dlg.m_strTask.Format(TEXT("A D D")) ; dlg.szBtnCaption = _T("Add"); dlg.szBtnCancel = _T("Cancel"); break; } if (dlg.DoModal() == IDOK) { dTemp = _tcstod(dlg.m_sValue, NULL) ; if(m_iItem < 0) { if(dTemp > 0.0 && !dlg.m_sLabel.IsEmpty()) { m_chart.AddValue(dTemp, dlg.m_sLabel, TRUE); m_iItem = -1; dTemp = 0.0; dlg.m_sLabel = _T(""); } } } }
void CListOptionCtrl::SetIndent() { if(!UpdateData(TRUE)) return; int nTemp = 0; CStringInputDlg dlg ; int nIndex=m_listBoxEx.GetCurSel(); LANGID dwLanguageID = GetSystemLanguagePrimaryID(); switch( dwLanguageID ) { case LANG_SPANISH: dlg.m_strPrompt.Format(TEXT("Introduzca el número de espacios indentados:")) ; dlg.szBtnOK = _T("Aceptar"); dlg.szBtnCancel = _T("Cancelar"); dlg.szDlgCaption = _T("ListOptionCtrl Cuadro de entrada"); break; default: dlg.m_strPrompt.Format(TEXT("Enter the list indent spaces:")) ; dlg.szBtnOK = _T("OK"); dlg.szBtnCancel = _T("Cancel"); dlg.szDlgCaption = _T("ListOptionCtrl InputBox"); break; } if (dlg.DoModal() == IDOK) { nTemp = _ttoi(dlg.m_strEdit) ; if (nTemp >= 0) m_nIndent = nTemp; VERIFY(m_listBoxEx.SetItemIndent(nIndex,m_nIndent)); } }
void CChartSeriePropDlg::OnSelectSineData() { LANGID dwLanguageID = GetSystemLanguagePrimaryID(); switch(dwLanguageID) { case LANG_SPANISH: GetDlgItem(IDC_DATAPARAM1_TEXT)->SetWindowText(_T("Amplitud senoidal:")); GetDlgItem(IDC_DATAPARAM2_TEXT)->SetWindowText(_T("Período senoidal:")); GetDlgItem(IDC_DATAPARAM1_EDIT)->SetWindowText(_T("100.0")); GetDlgItem(IDC_DATAPARAM2_EDIT)->SetWindowText(_T("10.0")); break; default: GetDlgItem(IDC_DATAPARAM1_TEXT)->SetWindowText(_T("Sine amplitude:")); GetDlgItem(IDC_DATAPARAM2_TEXT)->SetWindowText(_T("Sine period:")); GetDlgItem(IDC_DATAPARAM1_EDIT)->SetWindowText(_T("100.0")); GetDlgItem(IDC_DATAPARAM2_EDIT)->SetWindowText(_T("10.0")); break; } }
void CChartSeriePropDlg::OnSelectRandomData() { LANGID dwLanguageID = GetSystemLanguagePrimaryID(); switch(dwLanguageID) { case LANG_SPANISH: GetDlgItem(IDC_DATAPARAM1_TEXT)->SetWindowText(_T("Valor mínimo (Y):")); GetDlgItem(IDC_DATAPARAM2_TEXT)->SetWindowText(_T("Valor máximo (Y):")); GetDlgItem(IDC_DATAPARAM1_EDIT)->SetWindowText(_T("0")); GetDlgItem(IDC_DATAPARAM2_EDIT)->SetWindowText(_T("100")); break; default: GetDlgItem(IDC_DATAPARAM1_TEXT)->SetWindowText(_T("Minimun value (Y):")); GetDlgItem(IDC_DATAPARAM2_TEXT)->SetWindowText(_T("Maximun value (Y):")); GetDlgItem(IDC_DATAPARAM1_EDIT)->SetWindowText(_T("0")); GetDlgItem(IDC_DATAPARAM2_EDIT)->SetWindowText(_T("100")); break; } }
void CChartSeriePropDlg::OnSelectLineData() { LANGID dwLanguageID = GetSystemLanguagePrimaryID(); switch(dwLanguageID) { case LANG_SPANISH: GetDlgItem(IDC_DATAPARAM1_TEXT)->SetWindowText(_T("Pendiente línea:")); GetDlgItem(IDC_DATAPARAM2_TEXT)->SetWindowText(_T("Intercepción:")); GetDlgItem(IDC_DATAPARAM1_EDIT)->SetWindowText(_T("1.0")); GetDlgItem(IDC_DATAPARAM2_EDIT)->SetWindowText(_T("0.0")); break; default: GetDlgItem(IDC_DATAPARAM1_TEXT)->SetWindowText(_T("Line slope:")); GetDlgItem(IDC_DATAPARAM2_TEXT)->SetWindowText(_T("Line offset:")); GetDlgItem(IDC_DATAPARAM1_EDIT)->SetWindowText(_T("1.0")); GetDlgItem(IDC_DATAPARAM2_EDIT)->SetWindowText(_T("0.0")); break; } }
void CNSChartBarCtrl::OnModify() { LANGID dwLanguageID = GetSystemLanguagePrimaryID(); double dTemp; CNSChartDlg dlg ; switch( dwLanguageID ) { case LANG_SPANISH: dlg.m_strTask.Format(TEXT("M O D I F I C A R")) ; dlg.szBtnCaption = _T("Modificar"); dlg.szBtnCancel = _T("Cancelar"); break; default: dlg.m_strTask.Format(TEXT("M O D I F Y")) ; dlg.szBtnCaption = _T("Modify"); dlg.szBtnCancel = _T("Cancel"); break; } if (dlg.DoModal() == IDOK) { dTemp = _tcstod(dlg.m_sValue, NULL) ; if(dTemp > 0.0 && !dlg.m_sLabel.IsEmpty()) { m_chart.ModifyItem(m_iItem, dTemp, dlg.m_sLabel); } } }
void COutputTabView::SetStatus(int nCount, LPCTSTR szFolder) { CString sStatus; LPTSTR lpszStatus = _T("0"); if (szFolder != NULL) sStatus.Format(_T("(%d) - %s"), nCount, szFolder); else sStatus.Format(_T("%d items found"), nCount); LVCOLUMN lvcol; int iBufferSize = 254; LANGID dwLanguageID = GetSystemLanguagePrimaryID(); switch(dwLanguageID) { case LANG_SPANISH: //strCount = _T("Contenido *** ") + strCount + _T(" palabra(s) encontrada(s) de la búsqueda. ***"); lpszStatus = sStatus.GetBuffer(iBufferSize); lvcol.pszText = lpszStatus; m_listCtrl3.SetColumn(7, &lvcol); break; default: //strCount = _T("Content *** ")+ strCount + _T(" ocurrence(s) have been found. ***"); lpszStatus = sStatus.GetBuffer(iBufferSize); lvcol.pszText = lpszStatus; m_listCtrl3.SetColumn(7, &lvcol); break; } }
void CListOptionCtrl::OnAddItem() { if(!UpdateData(TRUE)) return; CStringInputDlg dlg ; int nIndex=m_listBoxEx.GetCount() + 1; LANGID dwLanguageID = GetSystemLanguagePrimaryID(); switch( dwLanguageID ) { case LANG_SPANISH: dlg.m_strPrompt.Format(TEXT("Introduzca el nuevo item:")) ; dlg.szBtnOK = _T("Aceptar"); dlg.szBtnCancel = _T("Cancelar"); dlg.szDlgCaption = _T("ListOptionCtrl Cuadro de entrada"); break; default: dlg.m_strPrompt.Format(TEXT("Enter the new item:")) ; dlg.szBtnOK = _T("OK"); dlg.szBtnCancel = _T("Cancel"); dlg.szDlgCaption = _T("ListOptionCtrl InputBox"); break; } if (dlg.DoModal() == IDOK) { LPCTSTR lpcItem = (LPCTSTR)dlg.m_strEdit; VERIFY(AddItem(lpcItem)); } }
void CGraphPanel::OnRBMenuCommand(UINT command_id) { LANGID dwLanguageID = GetSystemLanguagePrimaryID(); switch (command_id) { case GRAPH_RBMC_TOGGLE_POINT_MARKS: { ToggleGraphFlag(GRAPH_SQUAREPOINTS, TRUE); }; break; case GRAPH_RBMC_TRACE_MOUSE: { ToggleGraphFlag(GRAPH_SHOW_TOOLTIP, FALSE); }; break; case GRAPH_RBMC_SHOW_AXIS: { ToggleGraphFlag(GRAPH_DRAW_AXIS, TRUE); }; break; case GRAPH_RBMC_TOGGLE_SCATTER_MODE: { ToggleGraphFlag(GRAPH_GRAPH_SCATTER, TRUE); }; break; case GRAPH_RBMC_ZOOM_TOOL: { if (!bZoomActive) { bZoomActive = TRUE; zoomrect->m_rect.left = 5; zoomrect->m_rect.top = 5; zoomrect->m_rect.right = 50; zoomrect->m_rect.bottom = 50; } else { bZoomActive = FALSE; }; CRect r; zoomrect->GetTrueRect(&r); InvalidateRect(&r, FALSE); }; break; case GRAPH_RBMC_APPLY_ZOOM: { ApplyZoom(); }; break; case GRAPH_RBMC_FIT_WIDTH: case GRAPH_RBMC_FIT_HEIGHT: case GRAPH_RBMC_FIT_PAGE: { DoFit(command_id); }; break; case GRAPH_RBMC_VIEW_PROPERTIES: { CString szPropSheetName = _T(""); switch(dwLanguageID) { case LANG_SPANISH: szPropSheetName = _T("Propiedades"); break; default: szPropSheetName = _T("Properties"); break; } CPropertySheet prop_sheet((szPropSheetName), this); EnumerateParentWindows(AppendPropertyPageForAllParents, (void*)&prop_sheet); UINT result = prop_sheet.DoModal(); EnumerateParentWindows(ReleasePropertyPageForAllParents, (void*)result); if (result == IDOK) { CGraphWnd* main_wnd = get_main_graph_window(); main_wnd->UpdateWindows(GRAPH_WUV_ALL); }; }; break; }; }
void COutputTabView::AddFileToListCtrl3(CString sPath, CString sFileName, CString sFileSize, CString sFileDate) { LANGID dwLanguageID = GetSystemLanguagePrimaryID(); LVITEM Item; int iBufferSize = 128; int iCount = 0; int iType = 2; TCHAR buffer[1024]; CString sPos = _itot(g_fcurrentPos, buffer, 10); CString sLine = _itot(g_currentLine + 1, buffer, 10); LPTSTR lpszLine = sLine.GetBuffer(iBufferSize); LPTSTR lpszPos = sPos.GetBuffer(iBufferSize); LPTSTR lpszFilePath = (LPTSTR)sPath.GetBuffer(iBufferSize); LPTSTR lpszFileName = (LPTSTR)sFileName.GetBuffer(iBufferSize); LPTSTR lpszFileSize = (LPTSTR)sFileSize.GetBuffer(iBufferSize); LPTSTR lpszFileDate = (LPTSTR)sFileDate.GetBuffer(iBufferSize); LPTSTR lpszText = (LPTSTR)g_fText.GetBuffer(iBufferSize); sFileSize.ReleaseBuffer(); sFileDate.ReleaseBuffer(); sPath.ReleaseBuffer(); sFileName.ReleaseBuffer(); sPos.ReleaseBuffer(); sLine.ReleaseBuffer(); g_fText.ReleaseBuffer(); //Handle Internationational switch(dwLanguageID) { case LANG_SPANISH: Item = AddListItem3(0, 0, _T(""), iType ); break; default: Item = AddListItem3(0, 0, _T(""), iType ); break; } AddListSubItem3(Item, 0, 1,lpszLine); AddListSubItem3(Item, 0, 2,lpszPos); AddListSubItem3(Item, 0, 3,lpszFilePath); AddListSubItem3(Item, 0, 4,lpszFileName); AddListSubItem3(Item, 0, 5,lpszFileSize); AddListSubItem3(Item, 0, 6,lpszFileDate); AddListSubItem3(Item, 0, 7,lpszText); iCount = m_listCtrl3.GetItemCount(); CString strCount = _itot(iCount, buffer, 10); LPTSTR lpszCount = _T("0"); LVCOLUMN lvcol; switch(dwLanguageID) { case LANG_SPANISH: strCount = _T("Contenido *** ") + strCount + _T(" fichero(s) encontrado(s) de la búsqueda. ***"); lpszCount = strCount.GetBuffer(iBufferSize); lvcol.pszText = lpszCount; m_listCtrl3.SetColumn(7, &lvcol); break; default: strCount = _T("Content *** ")+ strCount + _T(" ocurrence(s) have been found. ***"); lpszCount = strCount.GetBuffer(iBufferSize); lvcol.pszText = lpszCount; m_listCtrl3.SetColumn(7, &lvcol); break; } }
void COutputTabView::FindExtDesc(CString strFindText, BOOL bCase, BOOL bWord, BOOL bRegularExpression) { //USES_CONVERSION; const int FIND_LENGTH = 1040; LANGID dwLanguageID = GetSystemLanguagePrimaryID(); BOOL bFound = FALSE; BOOL bWholeWord = FALSE; BOOL bMatchCase = FALSE; BOOL bRegExp = FALSE; LVITEM Item; int iBufferSize = 254; int iCount = 0; int iLine = 0; int iPos = 0; int iType = 1; TCHAR chBuff[16]; CMDIFrameWnd* pFrame = (CMDIFrameWnd*)::AfxGetApp()->m_pMainWnd; CMDIChildWnd* pChild = (CMDIChildWnd*) pFrame->MDIGetActive(); CScintillaView* pView = (CScintillaView*) pChild->GetActiveView(); ASSERT(pView); CScintillaCtrl& rCtrl = pView->GetCtrl(); int iLastLine = rCtrl.GetLineCount(); iPos = rCtrl.GetLineEndPosition(iLastLine -1); rCtrl.GotoPos(iPos); rCtrl.SetCurrentPos(iPos); if ( bCase == TRUE) bMatchCase = SCFIND_MATCHCASE; if ( bWord == TRUE) bWholeWord = SCFIND_WHOLEWORD; if ( bRegularExpression == TRUE) bRegExp = SCFIND_REGEXP; do { bFound = pView->FindTextSimple(strFindText, FALSE ,bMatchCase ,bWholeWord ,bRegExp); if (bFound == FALSE ) break; iPos = rCtrl.GetCurrentPos(); iLine = rCtrl.LineFromPosition(iPos); //int iLen = rCtrl.LineLength(iLine); int nStartSel = rCtrl.PositionFromLine(iLine); int nEndSel = rCtrl.GetLineEndPosition(iLine); int iLength = nEndSel - nStartSel + 1; TextRange tr; tr.chrg.cpMin = nStartSel; tr.chrg.cpMax = nEndSel; char sText[FIND_LENGTH]; tr.lpstrText = sText; if (iLength > FIND_LENGTH ) { rCtrl.GetText(FIND_LENGTH, sText); } else rCtrl.GetTextRange(&tr); CString strPos = _itot(iPos, chBuff, 10); CString strLine = _itot(iLine + 1, chBuff, 10); CString strText = (CString)sText; strText.Remove('\t'); LPTSTR lpszText = (LPTSTR)strText.GetBuffer(iBufferSize); LPTSTR lpszLine = strLine.GetBuffer(iBufferSize); LPTSTR lpszPos = strPos.GetBuffer(iBufferSize); LPTSTR lpszFilePath = _T(" - "); LPTSTR lpszFileName = _T(" - "); LPTSTR lpszFileSize = _T(" - "); LPTSTR lpszFileDate = _T(" - "); //Handle Internationational switch(dwLanguageID) { case LANG_SPANISH: Item = AddListItem3(0, 0, _T(""), iType ); break; default: Item = AddListItem3(0, 0, _T(""), iType ); break; } AddListSubItem3(Item, 0, 1,lpszLine); AddListSubItem3(Item, 0, 2,lpszPos); AddListSubItem3(Item, 0, 3,lpszFilePath); AddListSubItem3(Item, 0, 4,lpszFileName); AddListSubItem3(Item, 0, 5,lpszFileSize); AddListSubItem3(Item, 0, 6,lpszFileDate); AddListSubItem3(Item, 0, 7,lpszText); iCount++; } while( bFound == TRUE); CString strCount = _itot(iCount, chBuff, 10); LPTSTR lpszCount = _T("0"); LVCOLUMN lvcol; switch(dwLanguageID) { case LANG_SPANISH: strCount = _T("Contenido *** ") + strCount + _T(" palabra(s) encontrada(s) de la búsqueda. ***"); lpszCount = strCount.GetBuffer(iBufferSize); lvcol.pszText = lpszCount; m_listCtrl3.SetColumn(7, &lvcol); break; default: strCount = _T("Content *** ")+ strCount + _T(" ocurrence(s) have been found. ***"); lpszCount = strCount.GetBuffer(iBufferSize); lvcol.pszText = lpszCount; m_listCtrl3.SetColumn(7, &lvcol); break; } }
void CAipi_Error::displayRunTimeFileError(int e, int type, CString path, CString desc) { CAIPIApp* pApp = (CAIPIApp*)AfxGetApp(); BOOL alreadyOpen = pApp->UpdateDocumentView(path); //if document is not already open then open it if( alreadyOpen == FALSE ) { pApp->m_pAIPIEditorDocTemplate->OpenDocumentFile(path); } CMainFrame* pMainFrame = (CMainFrame*)::AfxGetMainWnd(); TCHAR buff[64]; CMDIFrameWnd* pFrame = (CMDIFrameWnd*)::AfxGetApp()->m_pMainWnd; CMDIChildWnd* pChild = (CMDIChildWnd*) pFrame->MDIGetActive(); CScintillaView* pView = (CScintillaView*) pChild->GetActiveView(); ASSERT(pView); CScintillaCtrl& rCtrl = pView->GetCtrl(); LPTSTR lpsErrLine =_T("0"); LPTSTR lpsErrPos = _T("0"); LPTSTR lpsErrCode = _T("0"); LPTSTR lpsErrDesc = _T("No description has found for this error"); LPTSTR lpsErrFile = _T(""); //Handle Internationational LANGID dwLanguageID = GetSystemLanguagePrimaryID(); switch( dwLanguageID) { case LANG_SPANISH: //errLine = _bstr_t(_T("Línea: ")) + _itot( g_currentLine, buff, 10 ); //errPos = _bstr_t(_T("Pos. ")) + _itot(g_currentPos, buff, 10); break; default: //errLine = _bstr_t(_T("Line: ")) + _itot( g_currentLine, buff, 10 ); //errPos = _bstr_t(_T("Pos. ")) + _itot(g_currentPos, buff, 10); break; } //errorMark(g_currentLine); switch(type) { case LEX_ERROR: ++g_LexError; break; case SINTAX_ERROR: ++g_SintaxError; break; case SEMANT_ERROR: ++g_SemantError; break; case WARNING_ERROR: ++g_WarningError; break; case QUESTION_ERROR: ++g_QuestionError; break; case STOP_ERROR: ++g_StopError; break; case INFO_ERROR: ++g_InfoError; break; } findErrorMembers(e); lpsErrCode = _itot( e, buff, 10 ); CString strErrPos = _itot(g_fcurrentPos, buff, 10); lpsErrPos = strErrPos.GetBuffer(0); strErrPos.ReleaseBuffer(); //CString strErrLine = _itot(g_currentLine, buff, 10); CString strErrLine = _itot(rCtrl.LineFromPosition(g_fcurrentPos) + 1, buff, 10); lpsErrLine = strErrLine.GetBuffer(0); strErrLine.ReleaseBuffer(); CString strErrDesc = m_ErrorMsg + desc; lpsErrDesc = strErrDesc.GetBuffer(0); strErrDesc.ReleaseBuffer(); CString strErrFile = g_currentFile; lpsErrFile = strErrFile.GetBuffer(0); lpsErrFile = strErrFile.GetBuffer(0); if ( pMainFrame->m_wndOutputTabView.IsVisible()) { pMainFrame->m_wndOutputTabView.m_TabViewContainer.SetActivePageIndex(1); LVITEM Item = pMainFrame->m_wndOutputTabView.AddListItem2(0, 0, _T(""), type); pMainFrame->m_wndOutputTabView.AddListSubItem2(Item, 0, 1, lpsErrLine); pMainFrame->m_wndOutputTabView.AddListSubItem2(Item, 0, 2, lpsErrPos); pMainFrame->m_wndOutputTabView.AddListSubItem2(Item, 0, 3, lpsErrDesc); pMainFrame->m_wndOutputTabView.AddListSubItem2(Item, 0, 4, lpsErrFile); pMainFrame->m_wndOutputTabView.AddListSubItem2(Item, 0, 5, lpsErrCode); } }
int COutputTabView::CreateList3() { //Create image list HICON hIcon[3]; int n; //Debug page if(!m_listCtrl3.Create(WS_CHILD|LVS_REPORT|LVS_SINGLESEL|LVS_SHOWSELALWAYS| LVS_SHAREIMAGELISTS|LVS_AUTOARRANGE|LVS_ALIGNLEFT,CRect(0,0,0,0), &m_TabViewContainer,IDC_LISTCTRL3)) return -1; m_TabViewContainer.AddPage(&m_listCtrl3,_T("Find in files"), 2); m_ilImageList3.Create(16, 16, 0, 3, 3); // small icons hIcon[0] = AfxGetApp()->LoadIcon(IDI_FIND1); hIcon[1] = AfxGetApp()->LoadIcon(IDI_FIND2); hIcon[2] = AfxGetApp()->LoadIcon(IDI_FIND3); for (n = 0; n < 3; n++) { m_ilImageList3.Add(hIcon[n]); } m_listCtrl3.SetImageList(&m_ilImageList3, LVSIL_SMALL); m_listCtrl3.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES|LVS_EX_UNDERLINEHOT|LVS_EX_ONECLICKACTIVATE|LVS_EX_INFOTIP); //Put Columns titles LANGID dwLanguageID = GetSystemLanguagePrimaryID(); if((m_listCtrl3.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=20; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText=_T(""); break; default: lvc.pszText=_T(""); break; } m_listCtrl3.InsertColumn(0,&lvc); } if((m_listCtrl3.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=50; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText=_T("Línea"); break; default: lvc.pszText=_T("Line"); break; } m_listCtrl3.InsertColumn(1,&lvc); } if((m_listCtrl3.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=60; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText=_T("Caracter"); break; default: lvc.pszText=_T("Character"); break; } m_listCtrl3.InsertColumn(2,&lvc); } if((m_listCtrl3.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=170; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText=_T("Ruta"); break; default: lvc.pszText=_T("Path"); break; } m_listCtrl3.InsertColumn(3 ,&lvc); } if((m_listCtrl3.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=75; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText=_T("Nombre"); break; default: lvc.pszText=_T("Name"); break; } m_listCtrl3.InsertColumn(4 ,&lvc); } if((m_listCtrl3.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=75; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText=_T("Tamaño"); break; default: lvc.pszText=_T("Size"); break; } m_listCtrl3.InsertColumn(5 ,&lvc); } if((m_listCtrl3.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=80; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText=_T("Modificado"); break; default: lvc.pszText=_T("Modified"); break; } m_listCtrl3.InsertColumn(6 ,&lvc); } if((m_listCtrl3.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=1000; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText=_T("Contenido"); break; default: lvc.pszText=_T("Content"); break; } m_listCtrl3.InsertColumn(7,&lvc); } return 0; }
///////////////////////////////////////////////////////////////////////////// // CChartSeriePropDlg message handlers void CChartSeriePropDlg::OnOK() { LANGID dwLanguageID = GetSystemLanguagePrimaryID(); _TCHAR szName[255]; GetDlgItem(IDC_SERIESNAME_EDIT)->GetWindowText(szName,254); for(int i=0; i<255; i++) { if( szName[i] != 'Ì') { m_strSeriesName += szName[i]; } } if (_tcscmp(szName,_T("")) == 0) { switch (dwLanguageID) { case LANG_SPANISH: MessageBox(_T("Debe suplir un nombre a la serie"),_T("Error")); return; default: MessageBox(_T("You must supply a series name"),_T("Error")); return; } } m_iSeriesType = m_SeriesTypeCombo.GetCurSel(); m_SeriesColour = m_ColourSelect.GetColour(); TCHAR szBuff[255]; GetDlgItem(IDC_MAXXVALUE_EDIT)->GetWindowText(szBuff,254); m_fMaxXValue = (float)_tcstod(szBuff, NULL); GetDlgItem(IDC_MINXVALUE_EDIT)->GetWindowText(szBuff,254); m_fMinXValue = (float)_tcstod(szBuff, NULL); if (m_fMinXValue > m_fMaxXValue) { switch(dwLanguageID) { case LANG_SPANISH: MessageBox(_T("El valor máximo de X debe ser > que el valor mínimo de X")); return; default: MessageBox(_T("Maximum X value should be > than the minimum X value")); return; } } m_iHorizAxis = m_HorizAxisCombo.GetCurSel(); m_iVertAxis = m_VertAxisCombo.GetCurSel(); GetDlgItem(IDC_POINTSNUMBER_EDIT)->GetWindowText(szBuff,254); m_iPointsNumber = _ttoi(szBuff); if (m_iPointsNumber < 2) { switch(dwLanguageID) { case LANG_SPANISH: MessageBox(_T("El número de puntos debe ser > 2")); return; default: MessageBox(_T("Number of points should be > 2")); return; } } if ( ((CButton*)GetDlgItem(IDC_LINEDATA_RADIO))->GetCheck() == 1) { m_iDataType = 0; GetDlgItem(IDC_DATAPARAM1_EDIT)->GetWindowText(szBuff,254); m_fLineSlope = (float)_tcstod(szBuff, NULL); GetDlgItem(IDC_DATAPARAM2_EDIT)->GetWindowText(szBuff,254); m_fLineOffset = (float)_tcstod(szBuff, NULL); } else if ( ((CButton*)GetDlgItem(IDC_SINEDATA_RADIO))->GetCheck() == 1) { m_iDataType = 1; GetDlgItem(IDC_DATAPARAM1_EDIT)->GetWindowText(szBuff,254); m_fSineAmplitude = (float)_tcstod(szBuff, NULL); GetDlgItem(IDC_DATAPARAM2_EDIT)->GetWindowText(szBuff,254); m_fSinePeriod = (float)_tcstod(szBuff, NULL); if (m_fSinePeriod == 0) { switch(dwLanguageID) { case LANG_SPANISH: MessageBox(_T("El período senoidal no puede ser 0.00"),_T("Error")); return; default: MessageBox(_T("Sine period cannot be 0.00"),_T("Error")); return; } } } else { m_iDataType = 2; GetDlgItem(IDC_DATAPARAM1_EDIT)->GetWindowText(szBuff,254); m_iRandMinVal = _ttoi(szBuff); GetDlgItem(IDC_DATAPARAM2_EDIT)->GetWindowText(szBuff,254); m_iRandMaxVal = _ttoi(szBuff); if (m_iRandMaxVal < m_iRandMinVal) { switch(dwLanguageID) { case LANG_SPANISH: MessageBox(_T("El máximo valor debe ser > mínimo valor")); return; default: MessageBox(_T("Maximum random value should be > minimum random value")); return; } } } CDialog::OnOK(); }
int COutputTabView::CreateList2() { //Create image list HICON hIcon[10]; int n; //Debug page if(!m_listCtrl2.Create(WS_CHILD|LVS_REPORT|LVS_SINGLESEL|LVS_SHOWSELALWAYS| LVS_SHAREIMAGELISTS|LVS_AUTOARRANGE|LVS_ALIGNLEFT,CRect(0,0,0,0), &m_TabViewContainer,IDC_LISTCTRL2)) return -1; m_TabViewContainer.AddPage(&m_listCtrl2,_T("Debug"), 1); m_ilImageList2.Create(16, 16, 0, 7, 10); // small icons hIcon[0] = AfxGetApp()->LoadIcon(IDI_ERROR_LEX); hIcon[1] = AfxGetApp()->LoadIcon(IDI_ERROR_SYNTAX); hIcon[2] = AfxGetApp()->LoadIcon(IDI_ERROR_SEMANT); hIcon[3] = AfxGetApp()->LoadIcon(IDI_ERROR_WARNING); hIcon[4] = AfxGetApp()->LoadIcon(IDI_ERROR_QUESTION); hIcon[5] = AfxGetApp()->LoadIcon(IDI_ERROR_STOP); hIcon[6] = AfxGetApp()->LoadIcon(IDI_ERROR_INFO); hIcon[7] = AfxGetApp()->LoadIcon(IDI_JS); hIcon[8] = AfxGetApp()->LoadIcon(IDI_VBS); for (n = 0; n < 10; n++) { m_ilImageList2.Add(hIcon[n]); } m_listCtrl2.SetImageList(&m_ilImageList2, LVSIL_SMALL); m_listCtrl2.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_UNDERLINEHOT|LVS_EX_INFOTIP); //Put Columns titles LANGID dwLanguageID = GetSystemLanguagePrimaryID(); if((m_listCtrl2.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=24; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText= _T(""); break; default: lvc.pszText= _T(""); break; } m_listCtrl2.InsertColumn(0,&lvc); } if((m_listCtrl2.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=75; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText= _T("Línea No."); break; default: lvc.pszText= _T("Line No."); break; } m_listCtrl2.InsertColumn(1,&lvc); } if((m_listCtrl2.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=100; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText= _T("Pos. Caracter"); break; default: lvc.pszText= _T("Character Pos."); break; } m_listCtrl2.InsertColumn(2,&lvc); } if((m_listCtrl2.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=750; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText= _T("Descripción Depuración"); break; default: lvc.pszText= _T("Debug Description"); break; } m_listCtrl2.InsertColumn(3,&lvc); } if((m_listCtrl2.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=300; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText= _T("Archivo"); break; default: lvc.pszText= _T("File"); break; } m_listCtrl2.InsertColumn(4, &lvc); } if((m_listCtrl2.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) { LV_COLUMN lvc; lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem=0; lvc.cx=75; switch(dwLanguageID) { case LANG_SPANISH: lvc.pszText= _T("Código Error"); break; default: lvc.pszText= _T("Error Code"); break; } m_listCtrl2.InsertColumn(5, &lvc); } return 0; }
void CGraphPanel::AppendMenuItems(CMenu* menu) { LANGID dwLanguageID = GetSystemLanguagePrimaryID(); //Point marks UINT menu_flags = MF_STRING | MF_ENABLED; if ((m_grflags & GRAPH_SQUAREPOINTS) == GRAPH_SQUAREPOINTS) { menu_flags |= MF_CHECKED; }; switch(dwLanguageID) { case LANG_SPANISH: menu->AppendMenu(menu_flags, GRAPH_RBMC_TOGGLE_POINT_MARKS, _T("Marcas de puntos")); break; default: menu->AppendMenu(menu_flags, GRAPH_RBMC_TOGGLE_POINT_MARKS, _T("Point marks")); break; } //Scatter graph menu_flags = MF_STRING | MF_ENABLED; if ((m_grflags & GRAPH_GRAPH_SCATTER) == GRAPH_GRAPH_SCATTER) { menu_flags |= MF_CHECKED; }; switch(dwLanguageID) { case LANG_SPANISH: menu->AppendMenu(menu_flags, GRAPH_RBMC_TOGGLE_SCATTER_MODE, _T("Gráfico disperso")); break; default: menu->AppendMenu(menu_flags, GRAPH_RBMC_TOGGLE_SCATTER_MODE, _T("Scatter graph")); break; } //Point marks menu_flags = MF_STRING | MF_ENABLED; if ((m_grflags & GRAPH_SHOW_TOOLTIP) == GRAPH_SHOW_TOOLTIP) { menu_flags |= MF_CHECKED; }; switch(dwLanguageID) { case LANG_SPANISH: menu->AppendMenu(menu_flags, GRAPH_RBMC_TRACE_MOUSE, _T("Rastreo coordenadas de ratón")); break; default: menu->AppendMenu(menu_flags, GRAPH_RBMC_TRACE_MOUSE, _T("Trace mouse coordinates")); break; } //Point marks menu_flags = MF_STRING | MF_ENABLED; if ((m_grflags & GRAPH_DRAW_AXIS) == GRAPH_DRAW_AXIS) { menu_flags |= MF_CHECKED; }; switch(dwLanguageID) { case LANG_SPANISH: menu->AppendMenu(menu_flags, GRAPH_RBMC_SHOW_AXIS, _T("Ejes")); break; default: menu->AppendMenu(menu_flags, GRAPH_RBMC_SHOW_AXIS, _T("Axis")); break; } //separator menu->AppendMenu(MF_SEPARATOR, 0, _T("")); //Zoom CMenu sub_menu; sub_menu.CreateMenu(); switch(dwLanguageID) { case LANG_SPANISH: menu->AppendMenu(MF_POPUP | MF_ENABLED | MF_STRING, (UINT)sub_menu.m_hMenu, _T("Acercar")); break; default: menu->AppendMenu(MF_POPUP | MF_ENABLED | MF_STRING, (UINT)sub_menu.m_hMenu, _T("Zoom")); break; } //Zoom tool menu_flags = MF_STRING | MF_ENABLED; if (bZoomActive) { menu_flags |= MF_CHECKED; }; switch(dwLanguageID) { case LANG_SPANISH: sub_menu.AppendMenu(menu_flags, GRAPH_RBMC_ZOOM_TOOL, _T("Herramienta para acercar")); break; default: sub_menu.AppendMenu(menu_flags, GRAPH_RBMC_ZOOM_TOOL, _T("Zoom tool")); break; } //Apply zoom menu_flags = MF_STRING; if (bZoomActive) { menu_flags |= MF_ENABLED; } else { menu_flags |= MF_GRAYED; }; switch(dwLanguageID) { case LANG_SPANISH: sub_menu.AppendMenu(menu_flags, GRAPH_RBMC_APPLY_ZOOM, _T("Aplicar")); break; default: sub_menu.AppendMenu(menu_flags, GRAPH_RBMC_APPLY_ZOOM, _T("Apply")); break; } sub_menu.Detach(); //Fit sub_menu.CreateMenu(); switch(dwLanguageID) { case LANG_SPANISH: menu->AppendMenu(MF_POPUP | MF_ENABLED | MF_STRING, (UINT)sub_menu.m_hMenu, _T("Ajustar...")); break; default: menu->AppendMenu(MF_POPUP | MF_ENABLED | MF_STRING, (UINT)sub_menu.m_hMenu, _T("Fit...")); break; } switch(dwLanguageID) { case LANG_SPANISH: sub_menu.AppendMenu(MF_STRING | MF_ENABLED, GRAPH_RBMC_FIT_WIDTH, _T("Ancho")); sub_menu.AppendMenu(MF_STRING | MF_ENABLED, GRAPH_RBMC_FIT_HEIGHT, _T("Alto")); sub_menu.AppendMenu(MF_STRING | MF_ENABLED, GRAPH_RBMC_FIT_PAGE, _T("Página")); break; default: sub_menu.AppendMenu(MF_STRING | MF_ENABLED, GRAPH_RBMC_FIT_WIDTH, _T("Width")); sub_menu.AppendMenu(MF_STRING | MF_ENABLED, GRAPH_RBMC_FIT_HEIGHT, _T("Height")); sub_menu.AppendMenu(MF_STRING | MF_ENABLED, GRAPH_RBMC_FIT_PAGE, _T("Page")); break; } sub_menu.Detach(); //separator menu->AppendMenu(MF_SEPARATOR, 0, _T("")); //properties switch(dwLanguageID) { case LANG_SPANISH: menu->AppendMenu(MF_STRING | MF_ENABLED, GRAPH_RBMC_VIEW_PROPERTIES, _T("Propiedades...")); break; default: menu->AppendMenu(MF_STRING | MF_ENABLED, GRAPH_RBMC_VIEW_PROPERTIES, _T("Properties...")); break; } }
BOOL CMediaPlayerDlg::DlgToolTips(UINT id, NMHDR * pNMHDR, LRESULT * pResult ) { LANGID dwLanguageID = GetSystemLanguagePrimaryID(); TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR; UINT nID = pTTT->uFlags; if(pTTT->uFlags & TTF_IDISHWND) { nID= ::GetDlgCtrlID((HWND)nID); if(!nID) { HWND hWndPlay = m_MPButtonPlay.GetSafeHwnd(); HWND hWndStop = m_MPButtonStop.GetSafeHwnd(); HWND hWndPause = m_MPButtonPause.GetSafeHwnd(); HWND hWndMute = m_MPCheckMute.GetSafeHwnd(); HWND hWndLoop = m_MPCheckLoop.GetSafeHwnd(); HWND hWndFullScreen = m_MPCheckFullScreen.GetSafeHwnd(); HWND hWndVolume = m_MPVolumeSlider.GetSafeHwnd(); HWND hWndSeekBar = m_MPSeekbar.GetSafeHwnd(); //Show tooltip Play if((HWND)(pNMHDR->idFrom) == hWndPlay) { switch(dwLanguageID) { case LANG_SPANISH: pTTT->lpszText = _T("Reproducir [R]"); break; default : pTTT->lpszText = _T("Play [P]"); break; } return TRUE; } //Show tooltip Stop if((HWND)(pNMHDR->idFrom) == hWndStop) { switch(dwLanguageID) { case LANG_SPANISH: pTTT->lpszText = _T("Detener [D]"); break; default : pTTT->lpszText = _T("Stop [S]"); break; } return TRUE; } //Show tooltip Pause if((HWND)(pNMHDR->idFrom) == hWndPause) { switch(dwLanguageID) { case LANG_SPANISH: pTTT->lpszText = _T("Pausar [P]"); break; default : pTTT->lpszText = _T("Pause [U]"); break; } return TRUE; } //Show tooltip Mute if((HWND)(pNMHDR->idFrom) == hWndMute) { switch(dwLanguageID) { case LANG_SPANISH: pTTT->lpszText = _T("Silencio [S]"); break; default : pTTT->lpszText = _T("Mute [M]"); break; } return TRUE; } //Show tooltip Loop if((HWND)(pNMHDR->idFrom) == hWndLoop) { switch(dwLanguageID) { case LANG_SPANISH: pTTT->lpszText = _T("Repetir [I]"); break; default : pTTT->lpszText = _T("Loop [L]"); break; } return TRUE; } //Show tooltip FullScreen if((HWND)(pNMHDR->idFrom) == hWndFullScreen) { switch(dwLanguageID) { case LANG_SPANISH: pTTT->lpszText = _T("Pantalla completa [C] Abandonar [Alt+Esc]"); break; default : pTTT->lpszText = _T("FullScreen [F] Quit [Alt+Esc]"); break; } return TRUE; } //Show tooltip Volume if((HWND)(pNMHDR->idFrom) == hWndVolume) { switch(dwLanguageID) { case LANG_SPANISH: pTTT->lpszText = _T("Volumen"); break; default : pTTT->lpszText = _T("Volume"); break; } return TRUE; } //Show tooltip Seekbar if((HWND)(pNMHDR->idFrom) == hWndSeekBar) { switch(dwLanguageID) { case LANG_SPANISH: pTTT->lpszText = _T("Buscar"); break; default : pTTT->lpszText = _T("Find"); break; } return TRUE; } } } return FALSE; }
BOOL CChartSeriePropDlg::OnInitDialog() { CDialog::OnInitDialog(); LANGID dwLanguageID = GetSystemLanguagePrimaryID(); switch(dwLanguageID) { case LANG_SPANISH: m_SeriesTypeCombo.AddString(_T("Lineal")); m_SeriesTypeCombo.AddString(_T("Puntos")); m_SeriesTypeCombo.AddString(_T("Surperficie")); m_VertAxisCombo.AddString(_T("Izquierda")); m_VertAxisCombo.AddString(_T("Derecha")); m_HorizAxisCombo.AddString(_T("Inferior")); m_HorizAxisCombo.AddString(_T("Superior")); /* CWnd::SetWindowText(_T("Propiedades series")); GetDlgItem(IDC_STATIC_SERIESPROP)->SetWindowText(_T("Propiedades series:")); GetDlgItem(IDC_STATIC_SERIESTYPE)->SetWindowText(_T("Tipo serie:")); GetDlgItem(IDC_STATIC_SERIESCOLOR)->SetWindowText(_T("Color serie:")); GetDlgItem(IDC_STATIC_SERIESNAME)->SetWindowText(_T("Nombre serie:")); GetDlgItem(IDC_STATIC_VERTICALAXIS)->SetWindowText(_T("Eje vertical asociado:")); GetDlgItem(IDC_STATIC_HORIZONTALAXIS)->SetWindowText(_T("Eje horizontal asociado:")); GetDlgItem(IDC_STATIC_SERIESDATA)->SetWindowText(_T("Datos serie:")); GetDlgItem(IDC_LINEDATA_RADIO)->SetWindowText(_T("Lineal")); GetDlgItem(IDC_SINEDATA_RADIO)->SetWindowText(_T("Senoidal")); GetDlgItem(IDC_RANDOMDATA_RADIO)->SetWindowText(_T("Aleatorio")); GetDlgItem(IDC_DATAPARAM1_TEXT)->SetWindowText(_T("Pendiente línea:")); GetDlgItem(IDC_DATAPARAM2_TEXT)->SetWindowText(_T("Intercepción:")); GetDlgItem(IDC_STATIC_POINTS)->SetWindowText(_T("Número puntos:")); GetDlgItem(IDC_STATIC_MINX_VAL)->SetWindowText(_T("Valor mínimo (X):")); GetDlgItem(IDC_STATIC_MAXX_VAL)->SetWindowText(_T("Valor máximo (X):")); GetDlgItem(IDOK)->SetWindowText(_T("Aceptar")); GetDlgItem(IDCANCEL)->SetWindowText(_T("Cancelar")); */ break; default: m_SeriesTypeCombo.AddString(_T("Line")); m_SeriesTypeCombo.AddString(_T("Points")); m_SeriesTypeCombo.AddString(_T("Surface")); m_VertAxisCombo.AddString(_T("Left")); m_VertAxisCombo.AddString(_T("Right")); m_HorizAxisCombo.AddString(_T("Bottom")); m_HorizAxisCombo.AddString(_T("Top")); /* CWnd::SetWindowText(_T("Series properties")); GetDlgItem(IDC_STATIC_SERIESPROP)->SetWindowText(_T("Series properties:")); GetDlgItem(IDC_STATIC_SERIESTYPE)->SetWindowText(_T("Series type:")); GetDlgItem(IDC_STATIC_SERIESCOLOR)->SetWindowText(_T("Series color:")); GetDlgItem(IDC_STATIC_SERIESNAME)->SetWindowText(_T("Series name:")); GetDlgItem(IDC_STATIC_VERTICALAXIS)->SetWindowText(_T("Associated vertical axis:")); GetDlgItem(IDC_STATIC_HORIZONTALAXIS)->SetWindowText(_T("Associated horizontal axis:")); GetDlgItem(IDC_STATIC_SERIESDATA)->SetWindowText(_T("Series data:")); GetDlgItem(IDC_LINEDATA_RADIO)->SetWindowText(_T("Line")); GetDlgItem(IDC_SINEDATA_RADIO)->SetWindowText(_T("Sine wave")); GetDlgItem(IDC_RANDOMDATA_RADIO)->SetWindowText(_T("Random")); GetDlgItem(IDC_DATAPARAM1_TEXT)->SetWindowText(_T("Line slope:")); GetDlgItem(IDC_DATAPARAM2_TEXT)->SetWindowText(_T("Line offset:")); GetDlgItem(IDC_STATIC_POINTS)->SetWindowText(_T("Number points:")); GetDlgItem(IDC_STATIC_MINX_VAL)->SetWindowText(_T("Minimum value (X):")); GetDlgItem(IDC_STATIC_MAXX_VAL)->SetWindowText(_T("Maximum value (X):")); GetDlgItem(IDOK)->SetWindowText(_T("OK")); GetDlgItem(IDCANCEL)->SetWindowText(_T("Cancel")); break; */ } m_SeriesTypeCombo.SetCurSel(0); m_HorizAxisCombo.SetCurSel(0); m_VertAxisCombo.SetCurSel(0); ((CButton*)GetDlgItem(IDC_LINEDATA_RADIO))->SetCheck(1); GetDlgItem(IDC_MINXVALUE_EDIT)->SetWindowText(_T("0.00")); GetDlgItem(IDC_MAXXVALUE_EDIT)->SetWindowText(_T("100.00")); GetDlgItem(IDC_DATAPARAM1_EDIT)->SetWindowText(_T("1.00")); GetDlgItem(IDC_DATAPARAM2_EDIT)->SetWindowText(_T("0.00")); GetDlgItem(IDC_POINTSNUMBER_EDIT)->SetWindowText(_T("100.00")); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }