Speedi3579
November 7th, 2003, 03:46 PM
Hello.
I have made a class that handles creating and registering the window. My WndProc function is one of the public functions of this class. It's protype looks like:
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
and the definition:
LRESULT CALLBACK awWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
...
code
...
}
awWindow is the class it is in.
Now the error comes up on this line of code, which is in my CreateWindow function, whish is a member of awWindow class.
wc.lpfnWndProc = (WNDPROC) WndProc;
The error code is:
error C2440: 'type cast' : cannot convert from ' ' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
None of the functions with this name in scope match the target type
Does anyone know how I can get this solved? What have I done wrong?
I have made a class that handles creating and registering the window. My WndProc function is one of the public functions of this class. It's protype looks like:
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
and the definition:
LRESULT CALLBACK awWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
...
code
...
}
awWindow is the class it is in.
Now the error comes up on this line of code, which is in my CreateWindow function, whish is a member of awWindow class.
wc.lpfnWndProc = (WNDPROC) WndProc;
The error code is:
error C2440: 'type cast' : cannot convert from ' ' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
None of the functions with this name in scope match the target type
Does anyone know how I can get this solved? What have I done wrong?