Click here to Skip to main content
15,898,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Dynamic loading Dll Pin
Laxman Auti18-May-06 1:11
Laxman Auti18-May-06 1:11 
AnswerRe: Dynamic loading Dll Pin
voorugonda prashanth18-May-06 1:18
voorugonda prashanth18-May-06 1:18 
AnswerRe: Dynamic loading Dll Pin
NiceNaidu18-May-06 2:26
NiceNaidu18-May-06 2:26 
QuestionHow to use sysinfo Control? Pin
chybin18-May-06 0:36
chybin18-May-06 0:36 
AnswerRe: How to use sysinfo Control? Pin
ThatsAlok18-May-06 1:43
ThatsAlok18-May-06 1:43 
GeneralRe: How to use sysinfo Control? Pin
chybin18-May-06 15:14
chybin18-May-06 15:14 
GeneralRe: How to use sysinfo Control? Pin
ThatsAlok18-May-06 18:53
ThatsAlok18-May-06 18:53 
QuestionWorking with Timers Pin
VinayCool18-May-06 0:29
VinayCool18-May-06 0:29 
Hi,

I have a timer which was working proeprly before adding threads, now i have added thread funtion after that timer is not displayed on the dialog window can anyone tell me what is the cause .....

-------------------------------------------
BOOL CStatusDlg::OnInitDialog()
{
CDialog::OnInitDialog();
HANDLE hr;
hr = CreateThread(NULL,0,(unsigned long (__stdcall *)(void *))WorkerThreadProc,this,0,0);
return TRUE;
}

---------------------------------------------------


UINT WorkerThreadProc(LPVOID Param)
{
CStatusDlg* status = (CStatusDlg *)Param;

time(&lStartTime);
SetTimer(NULL,ELAPSED_TIMER, 1000, NULL);
INDX.startIndex();
return true;
}
------------------------------------------------------



void CStatusDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
if(nIDEvent == ELAPSED_TIMER)
{
time(&lStopTime);
cteElapsedTime = CTimeSpan(lStopTime-lStartTime);
CString csElapsedTime;
csElapsedTime.Format("%02d:%02d:%02d",
cteElapsedTime.GetHours(),
cteElapsedTime.GetMinutes(),
cteElapsedTime.GetSeconds());
if(IsWindowVisible())
{
m_TIME.SetWindowText(csElapsedTime);
}
}
CDialog::OnTimer(nIDEvent);
}

-----------------------------------------------------------------
Smile | :)
Regards,
Vinay Charan.
AnswerRe: Working with Timers Pin
Michel Wassink18-May-06 0:48
Michel Wassink18-May-06 0:48 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 0:55
VinayCool18-May-06 0:55 
GeneralRe: Working with Timers Pin
Michel Wassink18-May-06 1:01
Michel Wassink18-May-06 1:01 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:07
VinayCool18-May-06 1:07 
GeneralRe: Working with Timers Pin
Michel Wassink18-May-06 1:31
Michel Wassink18-May-06 1:31 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:37
VinayCool18-May-06 1:37 
GeneralRe: Working with Timers Pin
Michel Wassink18-May-06 1:47
Michel Wassink18-May-06 1:47 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:50
VinayCool18-May-06 1:50 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:29
VinayCool18-May-06 1:29 
GeneralRe: Working with Timers Pin
ThatsAlok18-May-06 1:17
ThatsAlok18-May-06 1:17 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:19
VinayCool18-May-06 1:19 
GeneralRe: Working with Timers Pin
ThatsAlok18-May-06 1:40
ThatsAlok18-May-06 1:40 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:44
VinayCool18-May-06 1:44 
AnswerRe: Working with Timers Pin
Roger Stoltz18-May-06 2:03
Roger Stoltz18-May-06 2:03 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 2:13
VinayCool18-May-06 2:13 
GeneralRe: Working with Timers Pin
ThatsAlok18-May-06 2:06
ThatsAlok18-May-06 2:06 
QuestionRe: Working with Timers Pin
David Crow18-May-06 4:05
David Crow18-May-06 4:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.