can anybody find an error in this code
Code:
//---------------------------------------------------------------------------
LRESULT CALLBACK WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
HDC hDC;
PAINTSTRUCT Ps;
POINT Pt[15];
DWORD lpPts[] = { 4, 4, 7 };
// Left Triangle
Pt[0].x = 50;
Pt[0].y = 20;
Pt[1].x = 20;
Pt[1].y = 60;
Pt[2].x = 80;
Pt[2].y = 60;
Pt[3].x = 50;
Pt[3].y = 20;
// Second Triangle
Pt[4].x = 70;
Pt[4].y = 20;
Pt[5].x = 100;
Pt[5].y = 60;
Pt[6].x = 130;
Pt[6].y = 20;
Pt[7].x = 70;
Pt[7].y = 20;
// Hexagon
Pt[8].x = 145;
Pt[8].y = 20;
Pt[9].x = 130;
Pt[9].y = 40;
Pt[10].x = 145;
Pt[10].y = 60;
Pt[11].x = 165;
Pt[11].y = 60;
Pt[12].x = 180;
Pt[12].y = 40;
Pt[13].x = 165;
Pt[13].y = 20;
Pt[14].x = 145;
Pt[14].y = 20;
switch(Msg)
{
case WM_PAINT:
hDC = BeginPaint(hWnd, &Ps);
PolyPolyline(hDC, Pt, lpPts, 3);
EndPaint(hWnd, &Ps);
break;
case WM_DESTROY:
PostQuitMessage(WM_QUIT);
break;
default:
return DefWindowProc(hWnd, Msg, wParam, lParam);
}
return 0;
}
//---------------------------------------------------------------------------
i use dev c++ and when i run my program with this part, it says
"[Linker error] undefined reference to `_Z15WindowProcedureP6HWND__jjl@16' "
" C:\Dev-Cpp\Makefile.win
[Build Error] [Project1.exe] Error 1"