Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

drawing problem

Status
Not open for further replies.

bubak

Programmer
Jun 25, 2001
208
SK
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.
 
Please read my two answers on a similar GDI problem on thread thread116-91298. If you still cannot figure it out for yourself let me know.

Hope this helps, s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
Probably there is a bad day 4 me today or I don't know, I think my problem is somewhere between Burshes and Pens, or nor?
Yep, gotta browse msdn more and more.
have a nice time.
bubak
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top