problem in MFC
Posted on 2004-04-19
i created a app in vc++ MFC Dialog based and OS is WIN XP
On the INITDIALOG event i wrote
SetTimer(1,2000,NULL);///to enable the timer
On WM_TIMER event of the dialog i wrote
So far no problem .a message box displays every 2 seconds
Then i write a function Kll_Timer(to kill the timer)
i inserted this function by just writing in the SAME cpp file as Initdialog fuction and other functions generated by AppWizard
i also declared the void Kll_Timer(); on top of the cpp file
Usually a function is added by right clicking the class window and selecting Add Member Function...here i DID NOT do that.
then i inserted a button and the button click event is like this
Kll_Timer();// to call the function Kll_Timer(), which in turn kills the timer
When compiled it is showing error message
'KillTimer' : function does not take 1 parameters
Error executing cl.exe.
But when the function is created using app wizard ( by right clicking the class window and selecting the Add Member function . the KillTimer(1); with only a single parameter works
What could be the problem..... Actually this is a part of a large program..so i could not change the overall structure
thanks in advance...