using Timer in VC++
-
Dear all, In my project I woyld like to send data step by step, so now I want to put timer in this source to delay for each step, for example: send data 1 delay 2 seconds thend send data 2 delay 2seconds ... Anyone who have experence with timer in VC+ please help me solve this problem. Many thak for your help. As below is my source code:
void DlgComputing::OnButtonSendtorobot() { int rowData, rowOutput; int tmpi[3]; rowData = m_grid2.GetRow(); for (int i=1; i<= rowData; i++) { // Get Data from Grid1 for (int j=5;j < 8; j++) { m_grid2.SetRow(i); m_grid2.SetCol(j); CString tmp = m_grid2.GetText(); tmpi[j-5] = atoi(tmp); } SendtoKuka (tmpi[0],tmpi[1],tmpi[2],m_iA,m_iB,m_iC); } SendtoKuka(0, 0, 0, 0, 0, 0);
-
Dear all, In my project I woyld like to send data step by step, so now I want to put timer in this source to delay for each step, for example: send data 1 delay 2 seconds thend send data 2 delay 2seconds ... Anyone who have experence with timer in VC+ please help me solve this problem. Many thak for your help. As below is my source code:
void DlgComputing::OnButtonSendtorobot() { int rowData, rowOutput; int tmpi[3]; rowData = m_grid2.GetRow(); for (int i=1; i<= rowData; i++) { // Get Data from Grid1 for (int j=5;j < 8; j++) { m_grid2.SetRow(i); m_grid2.SetCol(j); CString tmp = m_grid2.GetText(); tmpi[j-5] = atoi(tmp); } SendtoKuka (tmpi[0],tmpi[1],tmpi[2],m_iA,m_iB,m_iC); } SendtoKuka(0, 0, 0, 0, 0, 0);
WinAPI Sleep(...) could give u help on delaying 2 seconds.
life is like a box of chocolate,you never know what you r going to get.
-
Dear all, In my project I woyld like to send data step by step, so now I want to put timer in this source to delay for each step, for example: send data 1 delay 2 seconds thend send data 2 delay 2seconds ... Anyone who have experence with timer in VC+ please help me solve this problem. Many thak for your help. As below is my source code:
void DlgComputing::OnButtonSendtorobot() { int rowData, rowOutput; int tmpi[3]; rowData = m_grid2.GetRow(); for (int i=1; i<= rowData; i++) { // Get Data from Grid1 for (int j=5;j < 8; j++) { m_grid2.SetRow(i); m_grid2.SetCol(j); CString tmp = m_grid2.GetText(); tmpi[j-5] = atoi(tmp); } SendtoKuka (tmpi[0],tmpi[1],tmpi[2],m_iA,m_iB,m_iC); } SendtoKuka(0, 0, 0, 0, 0, 0);
WaitForSingleObject !
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You