Error Setting lpfnWndProc

When trying to set my WndProc function (code at the end) as the message handler for a window class, I'm getting the following error from VC++ (2008):

error C3867: 'AST::CWindow::_WndProc': function call missing argument list; use '&AST::CWindow::_WndProc' to create a pointer to member

error C2440: '=' : cannot convert from 'LRESULT (__stdcall AST::CWindow::* )(HWND,UINT,WPARAM,LPARAM)' to 'WNDPROC'

The correction for this problem is suggested by the first error message, but I know that it's incorrect because this is a method and not a member.

I'm completely lost here on how to do this. Any ideas?


Code used (Called from a method of CWindow):
WndClass.lpfnWndProc = _WndProc;

_WndProc Declaration (A private method of CWindow):
LRESULT CALLBACK _WndProc ( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
Last edited on
Topic archived. No new replies allowed.