The problem is that it''s a member function. There is a way round it, though.
Although it''s hidden for us, C++ member functions have an extra parameter - the first parameter is the ''this'' pointer. So, when you create a member function which takes (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam), it actually takes (CTLGLApp *this, HWND hWnd...) and so on. That''s not what windows is asking you for in the WNDCLASS structure.
The way to get around it is to use a static member function (add the ''static'' keyword in front of the line in the class declaration).
The problem with *that* is that you lose all access to the specific window object itself. There''s ways of getting round that too, and they use GetWindowLong and SetWindowLong. I''ll leave the rest to you.
Superpig
- saving pigs from untimely fates
- sleeps in a ham-mock at www.thebinaryrefinery.cjb.net