Urgh! Im writing a general window class which goal is to hide the WIN32/WINAPI and at the same time offer OpenGL support for the window. So instead of creating a application full of WNDCLASSEX, HWND, HDC, HGLRC stuff, I made a cake and baked those things inside it.
But as you know, all window handles need a window class, and this window class need a window procedure! Say that I want this procedure to be a member of my window class, like this (and alot more of course):
class Window
{
private:
...
static WNDCLASSEX m_wc;
...
public:
...
bool create(int, int);
LRESULT CALLBACK wndProcedure(HWND, UINT, WPARAM, LPARAM);
...
};
Now in the 'Window::create' method, we specifies the WNDCLASSEX member:
...
m_wc.lpfnWndProc = &Window::wndProcedure;
...
But this will produce the following error:
window.cpp:13: error: cannot convert `LRESULT (Window::*)(HWND__*, UINT, WP
ARAM, LPARAM)' to `LRESULT (*)(HWND__*, UINT, WPARAM, LPARAM)' in assignment
How should I do to solve this???