Click here to Skip to main content
15,921,174 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRegistered ActiveX Controls Pin
Try9-Feb-07 22:51
Try9-Feb-07 22:51 
AnswerRe: Registered ActiveX Controls Pin
Joan M9-Feb-07 22:57
professionalJoan M9-Feb-07 22:57 
GeneralRe: Registered ActiveX Controls Pin
Try9-Feb-07 23:05
Try9-Feb-07 23:05 
GeneralRe: Registered ActiveX Controls Pin
Naveen9-Feb-07 23:25
Naveen9-Feb-07 23:25 
GeneralRe: Registered ActiveX Controls Pin
Joan M10-Feb-07 1:05
professionalJoan M10-Feb-07 1:05 
QuestionBuilding an MFC in Release Mode Pin
Member 17658779-Feb-07 21:03
Member 17658779-Feb-07 21:03 
AnswerRe: Building an MFC in Release Mode Pin
Michael Dunn9-Feb-07 21:10
sitebuilderMichael Dunn9-Feb-07 21:10 
Question2 Process at a time in Win 32 App Pin
Suresh H9-Feb-07 17:56
Suresh H9-Feb-07 17:56 
Hello All,

I have a timer in my dialog which starts in the function and some process is done and I have called the stop timer as below.

working code:-
<br />
<br />
int OnStart(HWND hwnd)<br />
{<br />
// Start the timer<br />
dwLastTickCount = GetTickCount();<br />
SetTimer(hwnd, ID_ELASPED_TIMER, 25, NULL);<br />
pA->start();<br />
KillTimer(hwnd, ID_ELASPED_TIMER);<br />
return 0;<br />
}




Now the problem is timer clock is not displayed on the dialog, once the process is over the timer is displayed.

Can one please tell me how to do 2 process at a time ??? displaying the timer clock on the dialog and doing the process ??

I tried with thread as below its not working what is the error ?? what changes I have to make to thread ??
<br />
<br />
int OnStart(HWND hwnd)<br />
{<br />
HANDLE hr;<br />
hr = CreateThread(NULL,0,(unsigned long (__stdcall *)(void *))WorkerThreadProc,0,0,0);<br />
<br />
return 0;<br />
}<br />
<br />
<br />
// Declaration<br />
UINT WorkerThreadProc(LPVOID Param);<br />
<br />
<br />
UINT WorkerThreadProc(LPVOID Param)<br />
{<br />
HWND hwnd;<br />
<br />
IMyA *pA;<br />
<br />
// Start the timer<br />
dwLastTickCount = GetTickCount();<br />
SetTimer(hwnd, ID_ELASPED_TIMER, 25, NULL);<br />
<br />
pA->start();<br />
<br />
KillTimer(hwnd, ID_ELASPED_TIMER);<br />
<br />
return true;<br />
}<br />


Thanking you,
Suresh HC.
AnswerRe: 2 Process at a time in Win 32 App Pin
Naveen9-Feb-07 18:04
Naveen9-Feb-07 18:04 
GeneralRe: 2 Process at a time in Win 32 App Pin
Suresh H9-Feb-07 18:31
Suresh H9-Feb-07 18:31 
QuestionRe: 2 Process at a time in Win 32 App Pin
Suresh H9-Feb-07 18:56
Suresh H9-Feb-07 18:56 
AnswerRe: 2 Process at a time in Win 32 App Pin
Naveen9-Feb-07 19:16
Naveen9-Feb-07 19:16 
GeneralRe: 2 Process at a time in Win 32 App Pin
Suresh H9-Feb-07 19:33
Suresh H9-Feb-07 19:33 
GeneralRe: 2 Process at a time in Win 32 App Pin
Naveen9-Feb-07 19:50
Naveen9-Feb-07 19:50 
GeneralRe: 2 Process at a time in Win 32 App Pin
Suresh H9-Feb-07 19:53
Suresh H9-Feb-07 19:53 
GeneralRe: 2 Process at a time in Win 32 App Pin
S Douglas10-Feb-07 22:43
professionalS Douglas10-Feb-07 22:43 
Questionhow can i pass my array object in function arguments by reference? Pin
amitmistry_petlad 9-Feb-07 16:59
amitmistry_petlad 9-Feb-07 16:59 
AnswerRe: how can i pass my array object in function arguments by reference? Pin
Naveen9-Feb-07 17:17
Naveen9-Feb-07 17:17 
GeneralRe: how can i pass my array object in function arguments by reference? Pin
amitmistry_petlad 9-Feb-07 17:20
amitmistry_petlad 9-Feb-07 17:20 
GeneralRe: how can i pass my array object in function arguments by reference? Pin
Naveen9-Feb-07 17:31
Naveen9-Feb-07 17:31 
AnswerRe: how can i pass my array object in function arguments by reference? Pin
Eytukan9-Feb-07 17:33
Eytukan9-Feb-07 17:33 
AnswerRe: how can i pass my array object in function arguments by reference? Pin
Michael Dunn9-Feb-07 17:39
sitebuilderMichael Dunn9-Feb-07 17:39 
GeneralRe: how can i pass my array object in function arguments by reference? Pin
Naveen9-Feb-07 17:57
Naveen9-Feb-07 17:57 
GeneralRe: how can i pass my array object in function arguments by reference? Pin
Michael Dunn9-Feb-07 21:09
sitebuilderMichael Dunn9-Feb-07 21:09 
GeneralRe: how can i pass my array object in function arguments by reference? Pin
Naveen9-Feb-07 21:13
Naveen9-Feb-07 21:13 

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.