Problem with DC_BURSH and SetDCBrushColor?

So I'm trying to create a Pie Chart in my application. When I use GetStockObject(GRAY_BRUSH) like so:

1
2
3
4
5
6
7
8
9
10
11
12
13
case IDB_BUTTON:
{
            HDC hdc = GetDC(hwndDlg);
            BeginPath(hdc);
            SelectObject(hdc, GetStockObject(GRAY_BRUSH));
            MoveToEx(hdc, nX, nY, (LPPOINT) NULL);
            AngleArc(hdc, nX, nY, dwRadius, xStartAngle, xSweepAngle);
            LineTo(hdc, nX, nY);
            EndPath(hdc);
            StrokeAndFillPath(hdc);
            ReleaseDC(hwndDlg, hdc);
}
break;


... it all works fine. But I want my pie slices to be colored, so I try doing this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
case IDB_BUTTON:
{          
            HDC hdc = GetDC(hwndDlg);
            SetDCBrushColor(hdc,RGB(253,157,1));
            BeginPath(hdc);
            SelectObject(hdc, GetStockObject(DC_BRUSH));
            MoveToEx(hdc, nX, nY, (LPPOINT) NULL);
            AngleArc(hdc, nX, nY, dwRadius, xStartAngle, xSweepAngle);
            LineTo(hdc, nX, nY);
            EndPath(hdc);
            StrokeAndFillPath(hdc);
            ReleaseDC(hwndDlg, hdc);
}
break;


But I get that SetDCBrushColor and DC_BURSH were not declared in this scope. I already tried linking gdi32.lib and no results. I'm using Code::Blocks 10.05, (May 27 2010 version).

Any help?
Thanks in advance :)
Last edited on
Bump?.. any help?.. I'm completely stuck on this :(

EDIT: tried updating my codeblocks to the latest version version but that didn't help
Last edited on
Topic archived. No new replies allowed.