VOID WINAPI CALLBACK process(UINT nTimerId, UINT msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
{
//cut...
}
пробовал?
This software required Windows 95 or better...
So I installed Linux
Здравствуйте!
Вот проблема:
class CTimer
{
//cut...
VOID CALLBACK process(UINT nTimerId, UINT msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
};
VOID CALLBACK process(UINT nTimerId, UINT msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
{
//cut...
}
CTimer::CTimer(int id, int precision, int type, HWND hDlg)
{
//cut...
timeSetEvent(precision, precision, process, (DWORD)hDlg, type); //Вот здесь. Не нравится её мой process, объявленный внутри класса...
//cut...
};
Выдаёт на той строчке:
C:\work\dev\kn_editor\timer.cpp(37) : error C2664: 'timeSetEvent' : cannot convert parameter 3 from 'void (unsigned int,unsigned int,unsigned long,unsigned long,unsigned long)' to 'void (__stdcall *)(unsigned int,unsigned int,unsigned long,unsigned long,unsigned long)'
None of the functions with this name in scope match the target
Что же делать? Подскажите, пожалуйста.
Заранее спасибо,
Kitsune
Здравствуйте, Kitsune, Вы писали:
K>Здравствуйте!
K>Вот проблема:
K>class CTimer
K>{
K> //cut...
K> VOID CALLBACK process(UINT nTimerId, UINT msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
K>};
Во-первых,
K>VOID CALLBACK CTimer::process(UINT nTimerId, UINT msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
K>{
K> //cut...
K>}
Ну это к слову, всё равно работать не будет, в данном случае callback ф-ия должна быть глобальной.
... << RSDN@Home 1.0 beta 7a >>