MFC Programming
Jun 10, 2011 at 9:13am
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
class CMainWindow
{
public:
LRESULT CALLBACK MainWndProc(HWND hWindow,
UINT nMessage,
WPARAM wParam,
PARAM lParam)
{
.....
return 0;
}
RegisterClass()
{
WNDCLASSEX wc;
...
wc.wndClassEx.lpfnWndProc = CMainWindow::MainWndProc;
}
};
|
error C2440: '=' : cannot convert from 'long (__stdcall CMainWindow::*)(struct HWND__ *,unsigned int,unsigned int,long)' to 'long (__stdcall *)(struct HWND__ *
,unsigned int,unsigned int,long)'
can someone help and give advice on this?
Jun 10, 2011 at 9:46am
Declare MainWndProc static.
Topic archived. No new replies allowed.