void CShowPageDlg::OnBnClickedBnTimehide() { // TODO: 在此添加控件通知处理程序代码 // SetTimer(TIMEHIDESHOW,1000,NULL); if(!m_bIsHide) { CRect windowRect; GetWindowRect(windowRect); m_rOldWindowRect = windowRect;//保存原来的rect CRect listBoxRect; m_OwnerListBox.GetWindowRect(listBoxRect); ScreenToClient(listBoxRect); windowRect.left-=listBoxRect.right; windowRect.right-=listBoxRect.right; MoveWindow(windowRect); CButton* pButton = (CButton*)GetDlgItem(IDC_BN_TIMEHIDE); pButton->SetWindowText(_T(">")); m_bIsHide=!m_bIsHide; } else { MoveWindow(m_rOldWindowRect); CButton* pButton = (CButton*)GetDlgItem(IDC_BN_TIMEHIDE); pButton->SetWindowText(_T("<")); m_bIsHide=!m_bIsHide; } }
void CoptimizerDlg::OnBnClickedButton1() { CButton *OptimizeButton = (CButton*)GetDlgItem(IDC_BUTTON1); CButton *CancelButton = (CButton*)GetDlgItem(IDCANCEL); CProgressCtrl *ProgressBar = (CProgressCtrl*)GetDlgItem(IDC_PROGRESS); int RetVal; OptimizeButton->SetWindowText(TEXT("Please wait...")); OptimizeButton->EnableWindow(FALSE); CancelButton->EnableWindow(FALSE); ProgressBar->SetPos(0); OptimizeBoot(OptimizeButton); #ifndef LDRONLY ProgressBar->SetPos(25); OptimizeRegistry(OptimizeButton); ProgressBar->SetPos(50); OptimizeLibraries(OptimizeButton); ProgressBar->SetPos(75); OptimizeSystem(OptimizeButton); #endif ProgressBar->SetPos(100); OptimizeButton->SetWindowText(TEXT("Optimize!")); OptimizeButton->EnableWindow(TRUE); CancelButton->EnableWindow(TRUE); RetVal = MessageBox(TEXT("You need to reboot the system for the changes to take effect. Reboot now?"), TEXT("Done."), MB_OKCANCEL); if(RetVal == IDOK) Reboot(); else InflictLoad(); }
// 按下“启动”/“停止”按钮,发消息到父窗体 void NetCfg::OnBnClickedBtnStart() { // TODO: 在此添加控件通知处理程序代码 CButton *hButton; CString strout; CString str_start = "启动"; HWND hparent; hparent = this->GetParent()->GetSafeHwnd(); hButton = (CButton *)GetDlgItem(IDC_BTN_START); hButton->GetWindowText(strout); if (strout == str_start) { hButton->SetWindowText("停止"); GetDlgItem(IDC_IP_TARGET)->EnableWindow(FALSE); GetDlgItem(IDC_COMBO_THREAD)->EnableWindow(FALSE); GetDlgItem(IDC_BTN_TRANSFER)->EnableWindow(TRUE); ::SendNotifyMessage(hparent,UM_DO_RUN_THREAD,NULL,NULL); } else { TurnRun(); hButton->SetWindowText("启动"); GetDlgItem(IDC_IP_TARGET)->EnableWindow(TRUE); GetDlgItem(IDC_COMBO_THREAD)->EnableWindow(TRUE); GetDlgItem(IDC_BTN_TRANSFER)->EnableWindow(FALSE); // GetDlgItem(IDC_EDIT_BROWSE)->EnableWindow(TRUE); // GetDlgItem(IDC_BTN_BROWSE)->EnableWindow(TRUE); // GetDlgItem(IDC_EDIT_TICK)->EnableWindow(TRUE); ::SendNotifyMessage(hparent,UM_DO_STOP_THREAD,NULL,NULL); } }
void Cdynamic_odeDlg::OnToggleHapticsButton() { g_main_app->toggle_haptics(); CButton* button = (CButton*)(GetDlgItem(IDC_TOGGLEHAPTICS_BUTTON)); button->SetWindowText(g_main_app->haptics_enabled?"Disable haptics":"Enable haptics"); if (!g_main_app->haptics_enabled) { CButton* button = (CButton*)(GetDlgItem(IDC_SECOND_DEVICE_BUTTON)); button->SetWindowText("Enable second device"); } }
void CTisDialog::RefreshDialog() { CButton *cb = (CButton *) GetDlgItem(IDC_OPEN); if(the_mos.m_drawclosed) cb->SetWindowText("Closed doors"); else cb->SetWindowText("Open doors"); cb->SetCheck(!the_mos.m_drawclosed); if(m_preview.m_bm) { DeleteObject(m_preview.m_bm); m_preview.m_bm=0; } if(editflg&LARGEWINDOW) { m_preview.m_maxextentx=m_preview.m_maxextenty=8;//maximum number of tiles fitting on screen } else { m_preview.m_maxextentx=m_preview.m_maxextenty=10; } CPoint point = m_preview.GetPoint(GP_TILE); if ((DWORD) point.x!=m_minx && (m_maxx-m_minx>(DWORD) m_preview.m_maxextentx)) { m_preview.m_clipx=point.x; } else { m_preview.m_clipx=m_minx; } m_preview.m_minclipx=m_minx; if ((DWORD) point.x!=m_minx && (m_maxx-m_minx>(DWORD) m_preview.m_maxextentx)) { m_preview.m_clipy=point.y; } else { m_preview.m_clipy=m_miny; } m_preview.m_minclipy=m_miny; m_preview.m_maxclipx=m_maxx+1; m_preview.m_maxclipy=m_maxy+1; if(m_graphics) { m_preview.RedrawContent(); } m_preview.ShowWindow(m_graphics); UpdateData(UD_DISPLAY); }
void NetCfg::TurnRun() { CButton *hButton; CString strout; CString str_start = "传输"; HWND hparent; hparent = this->GetParent()->GetSafeHwnd(); hButton = (CButton *)GetDlgItem(IDC_BTN_TRANSFER); hButton->GetWindowText(strout); // todo 检查文件是否存在 // 文件不存在,退出 if (0) { return ; } hButton->SetWindowText("传输"); GetDlgItem(IDC_EDIT_BROWSE)->EnableWindow(TRUE); GetDlgItem(IDC_BTN_BROWSE)->EnableWindow(TRUE); GetDlgItem(IDC_EDIT_TICK)->EnableWindow(TRUE); GetDlgItem(IDC_COMBO_TICK)->EnableWindow(TRUE); ::SendNotifyMessage(hparent,UM_DO_PAUSE_TRANSFER,NULL,NULL); }
void CCellphoneDlg::OnYes() { // TODO: Add extra validation here m_pCellphoneSocket = new CellphoneSocket(); if( !m_pCellphoneSocket->Create(CELLPHONE_PORT) ) { MessageBox("Failed to create the chatting socket"); delete m_pCellphoneSocket; m_pCellphoneSocket = NULL; } if( !m_pCellphoneSocket->Listen() ) { MessageBox("Failed to listen to a connection for chat"); delete m_pCellphoneSocket; m_pCellphoneSocket = NULL; } CEdit* status = (CEdit*)GetDlgItem(IDC_STATUS); CButton* ok = (CButton*)GetDlgItem(ID_YES); CButton* cancel = (CButton*)GetDlgItem(ID_NO); status->SetWindowText("Listening to a cellphone..."); ok->ShowWindow(FALSE); cancel->SetWindowText("Cancel"); cancel->ShowWindow(TRUE); m_bIsListening = true; m_bIsConnected = false; }
void Cdynamic_odeDlg::OnSecondDeviceButton() { g_main_app->toggle_second_device(); CButton* button = (CButton*)(GetDlgItem(IDC_SECOND_DEVICE_BUTTON)); button->SetWindowText(g_main_app->second_device_enabled?"Disable second device":"Enable second device"); }
///////////////////////////////////////////////////////////////////////////// // set up stuff, turn things on and off ///////////////////////////////////////////////////////////////////////////// void CNetworkAIDialog::initChecks() { int i, j; CButton *pCheck; CString str; //traverse controls for(i = 0; i < AI_DATABASE->numAI(); i++) { //set variables pCheck = &m_AI1Check + i; //set checkbox text str.Format("Use %s", AI_DATABASE->getAIName(i)); pCheck->SetWindowText(str); //see if it's already being used for(j = 0; j < (int) GAME->m_players.size(); j++) { //find it if(GAME->m_players[j].m_player.getID() == AI_DATABASE->getAIID(i)) { pCheck->SetCheck(TRUE); } else { pCheck->SetCheck(FALSE); } } } }
void CScriptEdit::RefreshDialog() { CString tmpstr; CButton *cb; int topline; int i; if(m_firsterror>=0) { topline=m_text_control.GetFirstVisibleLine(); for(i=0;i<LINES;i++) { cb=(CButton *) GetDlgItem(IDC_U1+i); if(topline+i>=m_count) { cb->ShowWindow(false); } else { cb->ShowWindow(true); tmpstr.Format("%d",topline+i+1); cb->SetWindowText(tmpstr); if(m_errors[topline+i]&0xffff) cb->SetCheck(false); else cb->SetCheck(true); } } } else { topline=m_text_control.GetFirstVisibleLine(); for(i=0;i<LINES;i++) { cb=(CButton *) GetDlgItem(IDC_U1+i); if(topline+i>=m_count) { cb->ShowWindow(false); } else { cb->ShowWindow(true); tmpstr.Format("%d",topline+i+1); cb->SetWindowText(tmpstr); cb->SetCheck(true); } } } }
void CPolygon::RefreshPolygon(bool repos) { CString tmpstr; CButton *cb; int i; if(!m_vertexpicker) return; m_vertexpicker.ResetContent(); for(i=0;i<*countvertex;i++) { tmpstr.Format("%d [%d.%d]",i+1, m_polygon[i].x,m_polygon[i].y); m_vertexpicker.AddString(tmpstr); } if(m_vertexnum<0) m_vertexnum=0; m_vertexnum=m_vertexpicker.SetCurSel(m_vertexnum); i=0; while(vertexboxids[i]) { GetDlgItem(vertexboxids[i])->EnableWindow(m_vertexnum>=0); i++; } cb = (CButton *) GetDlgItem(IDC_OPEN); if(m_open) cb->SetWindowText("Draw open"); else cb->SetWindowText("Draw closed"); the_mos.m_drawclosed=!m_open; if(m_preview.m_bm) { DeleteObject(m_preview.m_bm); m_preview.m_bm=0; } if(repos && m_vertexnum>=0) { m_preview.m_clipx=m_polygon[m_vertexnum].x/the_mos.mosheader.dwBlockSize-m_preview.m_maxextentx/2; m_preview.m_clipy=m_polygon[m_vertexnum].y/the_mos.mosheader.dwBlockSize-m_preview.m_maxextenty/2; } if(m_graphics) { m_preview.m_polygon=m_polygon; m_preview.m_vertexcount=*countvertex; m_preview.m_actvertex=m_vertexnum; m_preview.RedrawContent(); } m_preview.ShowWindow(m_graphics); }
void CMyCommView::OnBtviewrecdata() { // TODO: Add your control notification handler code here m_IsViewReceiveData = !m_IsViewReceiveData; if (m_IsViewReceiveData) { CButton * myb = (CButton *) GetDlgItem(IDC_BTVIEWRECDATA); myb->SetWindowText(_T("停止显示")); m_EditLogger.AddText(_T("\r\n继续显示\r\n")); } else { CButton * myb = (CButton *) GetDlgItem(IDC_BTVIEWRECDATA); myb->SetWindowText(_T("继续显示")); m_EditLogger.AddText(_T("\r\n停止显示")); } }
void CCustomerComment::OnSelchangeRoute() { int nI = pComboBoxROUTE->GetCurSel(); if(nI == CB_ERR) { pStaticDIRECTION_TEXT->EnableWindow(FALSE); pButtonNADIRECTION->SetCheck(FALSE); pButtonNADIRECTION->EnableWindow(FALSE); pButtonOUTBOUND->SetCheck(FALSE); pButtonOUTBOUND->EnableWindow(FALSE); pButtonINBOUND->SetCheck(FALSE); pButtonINBOUND->EnableWindow(FALSE); } else { pStaticDIRECTION_TEXT->EnableWindow(TRUE); pButtonNADIRECTION->EnableWindow(TRUE); pButtonNADIRECTION->SetCheck(TRUE); pButtonOUTBOUND->SetCheck(FALSE); pButtonINBOUND->SetCheck(FALSE); ROUTESKey0.recordID = pComboBoxROUTE->GetItemData(nI); if(btrieve(B_GETEQUAL, TMS_ROUTES, &ROUTES, &ROUTESKey0, 0) == 0) { CButton* pButton; for(int nJ = 0; nJ < 2; nJ++) { pButton = (nJ == 0 ? pButtonOUTBOUND : pButtonINBOUND); if(ROUTES.DIRECTIONSrecordID[nJ] == NO_RECORD) { pButton->SetWindowText(""); pButton->EnableWindow(FALSE); } else { DIRECTIONSKey0.recordID = ROUTES.DIRECTIONSrecordID[nJ]; btrieve(B_GETEQUAL, TMS_DIRECTIONS, &DIRECTIONS, &DIRECTIONSKey0, 0); strncpy(tempString, DIRECTIONS.longName, DIRECTIONS_LONGNAME_LENGTH); trim(tempString, DIRECTIONS_LONGNAME_LENGTH); pButton->SetWindowText(tempString); pButton->EnableWindow(TRUE); } } } } }
void Cforce_shadingDlg::OnToggleHapticsButton() { g_main_app->toggle_haptics(); CButton* button = (CButton*)(GetDlgItem(IDC_TOGGLEHAPTICS_BUTTON)); button->SetWindowText(g_main_app->haptics_enabled?"Disable haptics":"Enable haptics"); }
LRESULT CSequenceEditor::OnReadDone(WPARAM wParam, LPARAM lParam) { delete[] readobject.texttoread; reading = false; CButton* button = (CButton*) GetDlgItem( IDC_READBACK ); button->SetWindowText("Read Sequence"); return 0; }
void CMyCommView::OnBtvisiblevalue() { // TODO: Add your control notification handler code here CEdit * myedit = (CEdit *)GetDlgItem(IDC_EDRECDATAVALUE); CButton * mybt = (CButton *)GetDlgItem(IDC_BTVISIBLEVALUE); m_IsShowValueWindow = !m_IsShowValueWindow; if (m_IsShowValueWindow) { mybt->SetWindowText(_T("关闭结果窗")); myedit->ShowWindow(SW_SHOW); //SW_HIDE } else{ mybt->SetWindowText(_T("显示结果窗")); myedit->ShowWindow(SW_HIDE); } DoUpdateLayout(); }
void CMyCommView::OnSendkeyShiftenter() { // TODO: Add your command handler code here CMyCommApp * myApp = (CMyCommApp *)AfxGetApp(); myApp->m_SendkeyType = SKSHIFTENTER; CButton * mybt = (CButton *) GetDlgItem(IDC_BTSEND); mybt->SetWindowText(_T("发送 S")); myApp->DoSetStautsBarText(SBSSENDKEY,"S"); }
LRESULT CMainFrame::OnUpdateTab(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { HWND hwnd = (HWND)lParam; content::TAB_INFO ti = m_web_contents_delegate->GetTabInfo(hwnd); CButton button; button.Attach(hwnd); // 设置tab标题 button.SetWindowText(ti.title.c_str()); return 0; }
void CPortalDlg::OnBnClickedPortalShow() { // show / hide the key and change the label of the text // flip the show key flag m_fShowKey = !m_fShowKey; CEdit* e = (CEdit*)GetDlgItem(IDC_PORTAL_KEY); CButton* b = (CButton*)GetDlgItem(IDC_PORTAL_SHOW); if ( m_fShowKey ) { e->SetPasswordChar(0); b->SetWindowText(_T("Hide")); } else { e->SetPasswordChar('*'); b->SetWindowText(_T("Show")); } e->Invalidate(); }
void CGetImageDlg::OnStop() { m_bStarted = false; CButton *pBtn = (CButton *)GetDlgItem(IDOK); pBtn->SetWindowText(L"Start"); m_pcThrdNum.SetPos(0); CString tmp; tmp.LoadString(IDS_STOP); Echo(tmp); tmp.LoadString(IDS_STATUS_READY); SetStatus(tmp); }
void CdynControlDlg::OnBtnClickLock(UINT id) { int idx = id - LOCKBTN_ID_OFFSET; CButton *btn = (CButton*)GetDlgItem(id); CString str; btn->GetWindowText(str); if (str == _T("unlock")) { btn->SetWindowText(_T("lock")); log(_T("unlock 0x%02x\n"), idx); jointPositionUnlock(cmd, &cmdLen, idx); SendData(cmd, cmdLen); } else { btn->SetWindowText(_T("unlock")); log(_T("lock 0x%02x\n"), idx); jointPositionLock(cmd, &cmdLen, idx); SendData(cmd, cmdLen); } }
LRESULT NetCfg::StopButton(WPARAM wParam, LPARAM lParam) { CButton *hButton; TurnRun(); hButton = (CButton *)GetDlgItem(IDC_BTN_START); hButton->SetWindowText("启动"); GetDlgItem(IDC_IP_TARGET)->EnableWindow(TRUE); GetDlgItem(IDC_COMBO_THREAD)->EnableWindow(TRUE); GetDlgItem(IDC_BTN_TRANSFER)->EnableWindow(FALSE); return 0; }
void CTxMsgWndJ1939::vProcessTransmission(BOOL bStart) { m_CS_CyclicTrans.Lock(); CString omWndText = bStart ? _T("Stop") : _T("Transmit"); CButton* pButton = (CButton*)GetDlgItem(IDC_SEND); pButton->SetWindowText(omWndText); if (bStart == TRUE) { GetDlgItem(IDC_RADIO_TPF)->EnableWindow(FALSE); GetDlgItem(IDC_RADIO_NM)->EnableWindow(FALSE); vEnableTpfFields(FALSE); vEnableTpfFields(FALSE); m_omCheckCyclic.EnableWindow(FALSE); m_omMiliSecs.EnableWindow(FALSE); vSetTransState(TRANS_STARTED); } else { //First set the event sg_hMsgStopped if it is waiting SetEvent(sg_hMsgStopped); GetDlgItem(IDC_RADIO_TPF)->EnableWindow(TRUE); GetDlgItem(IDC_RADIO_NM)->EnableWindow(TRUE); pButton = (CButton*)GetDlgItem(IDC_RADIO_TPF); if (pButton->GetCheck() == BST_CHECKED) { vEnableTpfFields(TRUE); vEnableNmFields(FALSE); m_omCheckCyclic.EnableWindow(TRUE); if (m_omCheckCyclic.GetCheck() == BST_CHECKED) { m_omMiliSecs.EnableWindow(TRUE); } } else { vEnableTpfFields(FALSE); vEnableNmFields(TRUE); m_omCheckCyclic.EnableWindow(FALSE); m_omMiliSecs.EnableWindow(FALSE); } vSetTransState(TRANS_STOPPED); } m_CS_CyclicTrans.Unlock(); }
void CHallQueFrontView::OnManage() { // TODO: 在此添加命令处理程序代码 CMainFrame *pFrame=(CMainFrame*)AfxGetApp()->m_pMainWnd; if(m_isManage) { return; } CPassWordDlg PassWordDlg(this); if(PassWordDlg.DoModal()==IDOK) { CRect rect; pFrame->m_wndToolBar.GetWindowRect(&rect); m_isManage=TRUE; list<CTrackContrl*>::const_iterator itera = m_list_trackCtrl.begin(); for(itera;itera!=m_list_trackCtrl.end();itera++) { CTrackContrl* pTrackCtrl = *itera; ASSERT(pTrackCtrl!=NULL); pTrackCtrl->AlterAllCtrTop(-rect.Height()); pTrackCtrl->SetAllCtrContralDisable(); } //退出全屏 pFrame->EndFullScreen(); //////////////////保存背景DC GetBackDC(); //////////////////////重画 for(int i=0;i<m_pTrackCtrl->m_selTrackerAll.GetSize();i++) { m_pTrackCtrl->m_selTrackerAll[i]->Invalidate(); } ///////////////////// CRect clientRect; GetClientRect(clientRect); CRect newRect; newRect.left=clientRect.left;newRect.right=m_rShowPageRect.right; newRect.top=m_rShowPageRect.top+clientRect.Height()/2-m_rShowPageRect.Height()/2; newRect.bottom = newRect.top+m_rShowPageRect.Height(); m_pShowPageDlg->MoveWindow(newRect,FALSE); m_pShowPageDlg->ShowWindow(SW_SHOWNORMAL); CButton* pButton = (CButton*)m_pShowPageDlg->GetDlgItem(IDC_BN_TIMEHIDE); if(pButton) pButton->SetWindowText(_T("<")); } // Invalidate(); }
BOOL CFormatConverterWnd::OnInitDialog() { BOOL bResult = CPropertySheet::OnInitDialog(); // TODO: Add your specialized code here ModifyStyle(0, WS_MINIMIZEBOX); CButton* omBtn; WINDOWPLACEMENT omWndPlace; omBtn = reinterpret_cast<CButton*>(GetDlgItem(ID_APPLY_NOW)); omBtn->ShowWindow(SW_HIDE); omBtn->GetWindowPlacement(&omWndPlace); omBtn = reinterpret_cast<CButton*>(GetDlgItem(IDOK)); omBtn->ShowWindow(SW_HIDE); omBtn = reinterpret_cast<CButton*>(GetDlgItem(IDCANCEL)); omBtn->SetWindowText("Close"); omBtn->SetWindowPlacement(&omWndPlace); return bResult; }
void CDongbuAPIClientDlg::RequestRT(UINT nDlgItemId,CString szTitle, CString szRId, CString szParam) { CString szText ; CButton *pButton = (CButton *)GetDlgItem(nDlgItemId) ; if (pButton->GetCheck()) { theApp.SendToServerEx (DRCM_ADVICE, szRId, szParam, m_hWnd ); szText.Format("%s(%s)해제", szTitle, szRId); } else { theApp.SendToServerEx (DRCM_UNADVICE, szRId, szParam, m_hWnd ); szText.Format("%s(%s)등록", szTitle, szRId); } pButton->SetWindowText(szText); }
LRESULT CCellphoneDlg::OnAccept(WPARAM wParam, LPARAM lParam) { m_device->m_bOnInputDevice = true; m_device->m_typeOnInputDevice = CELLPHONE_TOUCHPAD; CEdit* status = (CEdit*)GetDlgItem(IDC_STATUS); CButton* ok = (CButton*)GetDlgItem(ID_YES); CButton* cancel = (CButton*)GetDlgItem(ID_NO); status->SetWindowText("Cellphone is connected"); ok->ShowWindow(FALSE); cancel->SetWindowText("Disconnect"); cancel->ShowWindow(TRUE); m_bIsListening = false; m_bIsConnected = true; return 0; }
void CCellphoneDlg::OnNo() { // TODO: Add extra cleanup here CEdit* status = (CEdit*)GetDlgItem(IDC_STATUS); CButton* ok = (CButton*)GetDlgItem(ID_YES); CButton* cancel = (CButton*)GetDlgItem(ID_NO); if(m_pCellphoneSocket) { delete m_pCellphoneSocket; m_pCellphoneSocket = NULL; } status->SetWindowText("Listen to a cellphone?"); ok->SetWindowText("Listen"); ok->ShowWindow(TRUE); cancel->ShowWindow(FALSE); m_bIsListening = false; m_bIsConnected = false; }
// enum camera callback static void callback(void *pItem, char *pDeviceName) { TCHAR buffer[80] = L""; size_t wlen; int *idcCam = (int*)pItem; if (*idcCam <= IDC_CAM4) { CButton *item = (CButton*)pDlg->GetDlgItem(*idcCam); item->EnableWindow(); item->SetCheck(BST_CHECKED); item->ShowWindow(SW_SHOWNORMAL); mbstowcs_s(&wlen, buffer, pDeviceName, 80); // Buffaloのカメラの行末にCR,LFが入っているので、これを除去 for (wlen--; 0 < wlen; wlen--) { if (buffer[wlen] == 13 || buffer[wlen] == 10) buffer[wlen] = 0; } item->SetWindowText(buffer); } (*idcCam)++; }
void CSequenceEditor::OnReadback() { readobject.cancel = true; SequenceWindow->SetFocus(); if (!reading) { reading = true; //Start a thread for reading back //First get the window text: readobject.texttoread = new char [SequenceWindow->GetWindowTextLength()+1]; SequenceWindow->GetWindowText(readobject.texttoread,SequenceWindow->GetWindowTextLength()+1); readobject.cancel = false; SequenceWindow->GetSel( readobject.start, readobject.stop); if (readobject.start==NULL) readobject.start = 0; if (readobject.stop==NULL) readobject.stop = SequenceWindow->GetWindowTextLength(); else if (readobject.start==readobject.stop) { readobject.start = 0; SequenceWindow->GetWindowTextLength(); } else readobject.stop--; readobject.datapath = GetSeqDocument()->datapath; readobject.parent = this; CButton* button = (CButton*) GetDlgItem( IDC_READBACK ); button->SetWindowText("Cancel Read"); SequenceWindow->SetFocus(); AfxBeginThread(ReadProc,&readobject); } }