WindowProc within a class
hi all
Im new to api in c++ and am having a problem and cant work it out.
my code works correctly if i keep my WindowProc function outside of my class which i am using for creating and destroying the window. which is why i would also like to handle messages within the same class however when i do this i get the following error message.
bvsetup.cpp(104) : error C2440: '=' : cannot convert from 'long (__stdcall BVSetUp::*)(struct HWND__ *,unsigned int,unsigned int,long)' to 'long (__stdcall *)(struct HWND
__ *,unsigned int,unsigned int,long)'
here is a snipit of my code
class BVSetUp
{
public:
BVSetUp();
BVSetUp(HINSTANCE, HINSTANCE, LPSTR, int);
~BVSetUp();
bool CreateGLWin();
void KillGLWindow();
virtual LRESULT CALLBACK WindowProc(HWND , UINT ,WPARAM , LPARAM );
};
bool BVSetUp::CreateGLWin()
{
...
WNDCLASS wc;
...
wc.lpfnWndProc = WindowProc;
...
}
I am using MSVC++6. Anything and everything will be appriciated
Thanks
Zee