Original Post
I have a very trivial problem...
I'm trying to do this:
class SomeClass
{
public:
SomeClass(HWND hWnd)
{
this->hWnd = hWnd;
WindowProcOriginal = (WNDPROC)SetWindowLong(hWnd, GWL_WNDPROC, (LONG)WindowProcHook);
}
~SomeClass()
{
SetWindowLong(hWnd, GWL_WNDPROC, (LONG)WindowProcOriginal);
}
private:
HWND hWnd;
LRESULT CALLBACK WindowProcHook(HWND, UINT, WPARAM, LPARAM)
{
return CallWindowProc(WindowProcOriginal, hWnd, message, wParam, lParam);
}
WNDPROC WindowProcOriginal;
};
Visual C++ 6.0 tells me that I cant convert WindowProcHook to LONG
I've done this before, but not in a class...
[edited by - Lejno on November 22, 2003 10:15:59 AM]