Skip to main content
GameDev.net gamedev.net
šŸ”’ Locked

SetTimer & TimerProc

Started by harry0418 Nov 11, 2000 at 12:03 AM 3 replies 700+ views
Original Post
harry0418
harry0418
Can someone tell me why I get this error when trying to compile this code using VC++ 5.0? error C2664: ''SetTimer'' : cannot convert parameter 4 from ''void (void *,unsigned int,unsigned int,unsigned long)'' to ''int (__stdcall *)(void)'' ##################### CODE ################################### int PlaySnd(void) { SetTimer(hwndMain,PLAYBUTTON_TIMER_ID, nSndSampleLen,PlayTimerProc); return 0; } VOID CALLBACK PlayTimerProc(HWND hwnd,UINT message, UINT iTimerID, DWORD dwTime) { // Stuff..... } ###################### END OF CODE ############################## Thanks
Shannon Barber
Shannon Barber
Timer call backs dont (ie cant) take any parameters, and return as int

    
//no ah ah

VOID CALLBACK PlayTimerProc(HWND hwnd,UINT message, UINT iTimerID, DWORD dwTime)

int PlayTimerProc()
{
return(false);
}



Edited by - Magmai Kai Holmlor on November 11, 2000 1:38:47 AM
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
skywind
skywind
good question ha ha :-)

I like game very much, so I want to make more people like it !
Life is :-(Life is :-)
harry0418
harry0418
Thanks for your suggestions...

I downloaded the latest Platform SDK from
Microsoft that includes the lastest headers
and libs. That fixed the problem. My code
now compiles as is.

Thanks again.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.