I need to draw colored rectangles into my CDIalog. when I do this:
CClientDC dc1(GetDlgItem(IDC_DATA));
dc1.SetBkColor(RGB(0,250,0));
dc1.SetTextColor(RGB(250,0,0));
dc1.Rectangle(10,10,200,200);
the rect is drawn, but not with the green and red color
when I try this :
CBrush *pBrushBlank;
CPaintDC dc(GetDlgItem(IDC_DATA));
pBrushBlank = new CBrush(RGB(255,0,0));
dc.SelectObject(pBrushBlank);
dc.Ellipse(80, 80, 160, 160);
nothing happends.
IDC_DATA is a groupbox, that should be used as the border for the rectangles.
If anybody could help, thx a lot.
CClientDC dc1(GetDlgItem(IDC_DATA));
dc1.SetBkColor(RGB(0,250,0));
dc1.SetTextColor(RGB(250,0,0));
dc1.Rectangle(10,10,200,200);
the rect is drawn, but not with the green and red color
when I try this :
CBrush *pBrushBlank;
CPaintDC dc(GetDlgItem(IDC_DATA));
pBrushBlank = new CBrush(RGB(255,0,0));
dc.SelectObject(pBrushBlank);
dc.Ellipse(80, 80, 160, 160);
nothing happends.
IDC_DATA is a groupbox, that should be used as the border for the rectangles.
If anybody could help, thx a lot.