Click here to Skip to main content
15,905,971 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: all urls Pin
Hamid_RT7-Jul-06 2:55
Hamid_RT7-Jul-06 2:55 
Questionto make a phone Pin
yogendra kaushik7-Jul-06 2:19
yogendra kaushik7-Jul-06 2:19 
AnswerRe: to make a phone Pin
Amit Agarrwal7-Jul-06 2:29
Amit Agarrwal7-Jul-06 2:29 
GeneralRe: to make a phone Pin
yogendra kaushik7-Jul-06 2:43
yogendra kaushik7-Jul-06 2:43 
AnswerRe: to make a phone Pin
David Crow7-Jul-06 2:44
David Crow7-Jul-06 2:44 
AnswerRe: to make a phone [modified] Pin
_AnsHUMAN_ 7-Jul-06 3:26
_AnsHUMAN_ 7-Jul-06 3:26 
AnswerRe: to make a phone Pin
ThatsAlok9-Jul-06 20:42
ThatsAlok9-Jul-06 20:42 
QuestionSetTimer call in CWinThread Pin
kumar_subrahmanya7-Jul-06 1:48
kumar_subrahmanya7-Jul-06 1:48 
Hi All,

I am using SetTimer API to create timers in a UI Thread (CWinThread
derived class)


The code looks as follows ->


m_timerId=::SetTimer(NULL,0,1000,NULL);

where m_timerId is a member data variable.


My Message map & onTimer looks as follows.


BEGIN_MESSAGE_MAP(CMyThread, CWinThread) <br />
ON_THREAD_MESSAGE(WM_TIMER, OnTimer) <br />
END_MESSAGE_MAP() <br />
<br />
<br />
void CMyThread::OnTimer(WPARAM wParam, LPARAM /*lParam*/) <br />
{ <br />
if(wParam==m_timerId) <br />
{ <br />
//timer processing code here <br />
<br />
<br />
<br />
} <br />
} 


This code works!!!!!!!!!!!!!!!!
But SetTimer API documentation does not talk about the above usage.
(where in both hWnd and callback functions are NULL)

Has any one tried this kind of usage of SetTimer with CWinThread
object?
If yes, do let me know if you have encountered any problems.


Regards


PS : Most of the documentations talk only about SetTimer working with
either window object or a call back but never with CWinThread!!!. I
have also seen complicated work arounds to make SetTimer work with
CWinThread. So I am little concerned to use this approach.
AnswerRe: SetTimer call in CWinThread Pin
David Crow7-Jul-06 2:55
David Crow7-Jul-06 2:55 
GeneralRe: SetTimer call in CWinThread Pin
kumar_subrahmanya9-Jul-06 20:19
kumar_subrahmanya9-Jul-06 20:19 
AnswerRe: SetTimer call in CWinThread Pin
Randor 7-Jul-06 4:04
professional Randor 7-Jul-06 4:04 
GeneralRe: SetTimer call in CWinThread Pin
kumar_subrahmanya9-Jul-06 20:20
kumar_subrahmanya9-Jul-06 20:20 
QuestionDelay of 250micro Sec Pin
Shiva Prasad7-Jul-06 1:33
Shiva Prasad7-Jul-06 1:33 
AnswerRe: Delay of 250micro Sec Pin
Chris Losinger7-Jul-06 1:43
professionalChris Losinger7-Jul-06 1:43 
AnswerRe: Delay of 250micro Sec Pin
Rilhas9-Jul-06 2:30
Rilhas9-Jul-06 2:30 
QuestionMulticolumn listbox Pin
Amit Agarrwal7-Jul-06 1:30
Amit Agarrwal7-Jul-06 1:30 
AnswerRe: Multicolumn listbox /*modified*/ Pin
Hamid_RT7-Jul-06 1:34
Hamid_RT7-Jul-06 1:34 
GeneralRe: Multicolumn listbox /*modified*/ Pin
Amit Agarrwal7-Jul-06 2:18
Amit Agarrwal7-Jul-06 2:18 
GeneralRe: Multicolumn listbox Pin
Hamid_RT7-Jul-06 2:54
Hamid_RT7-Jul-06 2:54 
GeneralRe: Multicolumn listbox /*modified*/ Pin
David Crow7-Jul-06 2:56
David Crow7-Jul-06 2:56 
QuestionParallel Port acess & Reading Char strings to Labels / Lists [modified] Pin
markwalker847-Jul-06 1:21
markwalker847-Jul-06 1:21 
Answer[OT] Re: Parallel Port acess & Reading Char strings to Labels / Lists Pin
David Crow7-Jul-06 2:59
David Crow7-Jul-06 2:59 
GeneralRe: [OT] Re: Parallel Port acess & Reading Char strings to Labels / Lists Pin
markwalker847-Jul-06 3:08
markwalker847-Jul-06 3:08 
AnswerRe: Parallel Port acess & Reading Char strings to Labels / Lists Pin
earl7-Jul-06 6:20
earl7-Jul-06 6:20 
GeneralRe: Parallel Port acess & Reading Char strings to Labels / Lists Pin
markwalker849-Jul-06 22:48
markwalker849-Jul-06 22:48 

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.