April 27th, 1999, 04:46 AM
Can someone help me with a problem I am having. I am trying to register the winproc function as the lpfnWndProc variable of my WNDCLASS.
here is the function I have defined previously
long WINAPI WinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
and then in the WinMain function I try to say
WNDCLASS wc;
wc.lpfnWndProc = WinProc;
The error I get looks like this:
error C2440: '=' : cannot convert from 'long (__stdcall CMainGL::*)(struct HWND__ *,unsigned int,unsigned int,long)' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
As you can probably deduce from the error, this function calling is taking place inside a class called CMainGL.(I am trying to incorperate opengl as well). However, should it really matter if it is __stdcall CMainGL::* or __stdcall * . What is the difference and how do I get around this.
here is the function I have defined previously
long WINAPI WinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
and then in the WinMain function I try to say
WNDCLASS wc;
wc.lpfnWndProc = WinProc;
The error I get looks like this:
error C2440: '=' : cannot convert from 'long (__stdcall CMainGL::*)(struct HWND__ *,unsigned int,unsigned int,long)' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
As you can probably deduce from the error, this function calling is taking place inside a class called CMainGL.(I am trying to incorperate opengl as well). However, should it really matter if it is __stdcall CMainGL::* or __stdcall * . What is the difference and how do I get around this.