lsdi
06-23-2002, 08:04 PM
Please help me...
Im trying to put the CALLBACK function inside a c++ class, but Im try to use:
...
hInstance = GetModuleHandle(NULL);
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wc.lpfnWndProc = (WNDPROC) this->WndProc;
...
I get this error:
error C2440: '=' : cannot convert from 'long (__stdcall MyClass::*)(struct HWND__ *,unsigned int,unsigned int,long)' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
Definitions:
class MyClass {
public:
LRESULT CALLBACK WndProc( HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam);
}
LRESULT CALLBACK MyClass::WndProc( HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
return 0;
}
[This message has been edited by lsdi (edited 06-23-2002).]
[This message has been edited by lsdi (edited 06-23-2002).]
Im trying to put the CALLBACK function inside a c++ class, but Im try to use:
...
hInstance = GetModuleHandle(NULL);
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wc.lpfnWndProc = (WNDPROC) this->WndProc;
...
I get this error:
error C2440: '=' : cannot convert from 'long (__stdcall MyClass::*)(struct HWND__ *,unsigned int,unsigned int,long)' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
Definitions:
class MyClass {
public:
LRESULT CALLBACK WndProc( HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam);
}
LRESULT CALLBACK MyClass::WndProc( HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
return 0;
}
[This message has been edited by lsdi (edited 06-23-2002).]
[This message has been edited by lsdi (edited 06-23-2002).]