Re: Thread and Timer
- From: "AliR \(VC++ MVP\)" <AliR@xxxxxxxxxxxxx>
- Date: Thu, 13 Mar 2008 14:18:09 GMT
Joe you must be kidding, he needs a window in his UI thread just use timers?
::SetTimer works just fine in CWinThread. All you have to do is set a
ON_THREAD_MESSAGE(WM_TIMER,OnTimer) in your message map.
AliR.
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:jvcit3hs7gfnce0ttl9vsliqmfbcc2pv4c@xxxxxxxxxx
Is it a UI thread? Is the timer associated with a window in the UI
thread? (You may have
to create an invisible top-level window to get this to work...)
joe
On Thu, 13 Mar 2008 02:42:20 -0700 (PDT), Stefano <posting@xxxxxxxxxx>
wrote:
On 12 Mar, 16:39, Joseph M. Newcomer <newco...@xxxxxxxxxxxx> wrote:Joseph M. Newcomer [MVP]
Why not do something very simple: ON_WM_TIMER()?
I tryed with ON_WM_TIMER but it's never called.
You do not need a g_iTmer, g_hWnd, or g_iMessage here, if this were a
handler for
WM_TIMER. Get rid of them. I can't even imagine why they are needed at
all, since they
coudl be member variables of the CWatchDog class.
Yes you are right. I copyed and paste the code from the the callback.
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: Thread and Timer
- From: Joseph M . Newcomer
- Re: Thread and Timer
- References:
- Thread and Timer
- From: Stefano
- Re: Thread and Timer
- From: Joseph M . Newcomer
- Re: Thread and Timer
- From: Stefano
- Re: Thread and Timer
- From: Joseph M . Newcomer
- Thread and Timer
- Prev by Date: Re: UNICODE conversion
- Next by Date: Re: Directory watcher
- Previous by thread: Re: Thread and Timer
- Next by thread: Re: Thread and Timer
- Index(es):
Relevant Pages
|