Click here to Skip to main content
15,029,944 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Dynamic loading Dll Pin
Laxman Auti18-May-06 1:11
MemberLaxman Auti18-May-06 1:11 
AnswerRe: Dynamic loading Dll Pin
voorugonda prashanth18-May-06 1:18
Membervoorugonda prashanth18-May-06 1:18 
AnswerRe: Dynamic loading Dll Pin
NiceNaidu18-May-06 2:26
MemberNiceNaidu18-May-06 2:26 
QuestionHow to use sysinfo Control? Pin
chybin18-May-06 0:36
Memberchybin18-May-06 0:36 
AnswerRe: How to use sysinfo Control? Pin
ThatsAlok18-May-06 1:43
MemberThatsAlok18-May-06 1:43 
GeneralRe: How to use sysinfo Control? Pin
chybin18-May-06 15:14
Memberchybin18-May-06 15:14 
GeneralRe: How to use sysinfo Control? Pin
ThatsAlok18-May-06 18:53
MemberThatsAlok18-May-06 18:53 
QuestionWorking with Timers Pin
VinayCool18-May-06 0:29
MemberVinayCool18-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
MemberMichel Wassink18-May-06 0:48 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 0:55
MemberVinayCool18-May-06 0:55 
GeneralRe: Working with Timers Pin
Michel Wassink18-May-06 1:01
MemberMichel Wassink18-May-06 1:01 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:07
MemberVinayCool18-May-06 1:07 
GeneralRe: Working with Timers Pin
Michel Wassink18-May-06 1:31
MemberMichel Wassink18-May-06 1:31 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:37
MemberVinayCool18-May-06 1:37 
GeneralRe: Working with Timers Pin
Michel Wassink18-May-06 1:47
MemberMichel Wassink18-May-06 1:47 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:50
MemberVinayCool18-May-06 1:50 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:29
MemberVinayCool18-May-06 1:29 
GeneralRe: Working with Timers Pin
ThatsAlok18-May-06 1:17
MemberThatsAlok18-May-06 1:17 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:19
MemberVinayCool18-May-06 1:19 
GeneralRe: Working with Timers Pin
ThatsAlok18-May-06 1:40
MemberThatsAlok18-May-06 1:40 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 1:44
MemberVinayCool18-May-06 1:44 
AnswerRe: Working with Timers Pin
Roger Stoltz18-May-06 2:03
MemberRoger Stoltz18-May-06 2:03 
GeneralRe: Working with Timers Pin
VinayCool18-May-06 2:13
MemberVinayCool18-May-06 2:13 
GeneralRe: Working with Timers Pin
ThatsAlok18-May-06 2:06
MemberThatsAlok18-May-06 2:06 
QuestionRe: Working with Timers Pin
David Crow18-May-06 4:05
MemberDavid 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.