Re: SetTimer and WM_TIMER?
From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: 11/04/04
- Next message: O.B.: "Re: SetTimer and WM_TIMER?"
- Previous message: Igor Tandetnik: "Re: SetTimer and WM_TIMER?"
- In reply to: O.B.: "SetTimer and WM_TIMER?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 04 Nov 2004 18:53:19 -0500
O.B. wrote:
> I see many posts about problems with SetTimer but not a solution that
> fits my case.
>
> I have a SDI program in VC++ v6. In the "View" class constructor, I have:
> ::SetTimer(0, 0, 200, 0)
>
> I added a message handler using the "Class Wizard" to handle WM_TIMER
> events. However, that handler never gets invoked.
>
> What's wrong with my syntax? Is there additional code I must add?
Try actually giving it the first argument:
::SetTimer(m_hWnd, ...
and don't do it in the c-tor, do it in the 'OnCreate', where 'm_hWnd' is
already valid.
V
- Next message: O.B.: "Re: SetTimer and WM_TIMER?"
- Previous message: Igor Tandetnik: "Re: SetTimer and WM_TIMER?"
- In reply to: O.B.: "SetTimer and WM_TIMER?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|