Ik heb een klasse gemaakt die bij instantie een window creeert en beheert. Tenminste dat is de bedoeling. Bij het initialiseren is het de bedoeling dat aan de te registeren WNDCLASSEX structure een message handle procedure wordt meegegeven. De WndProc van het type WNDPROC. Dit is nu een procedure van de klasse geworden welke het window beheert. Met voor de rest alleen default waarde krijg je
Nu krijg ik echter een heel vage foutmelding:
c:\projects\vec\vec\MainWindow.cpp(88): error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'WNDPROC'
Iemand suggesties? Of toelichting op wat in de help staat, want daar snap ik niet echt veel van.
Alvast Bedankt!
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)this->WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_VEC);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = (LPCTSTR)IDC_VEC;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);
m_ClassID = RegisterClassEx(&wcex); |
Nu krijg ik echter een heel vage foutmelding:
c:\projects\vec\vec\MainWindow.cpp(88): error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'WNDPROC'
Iemand suggesties? Of toelichting op wat in de help staat, want daar snap ik niet echt veel van.
Alvast Bedankt!
All your quantifications are belong to me!