stou
July 10th, 1999, 05:35 AM
Hi, I am trying to erase the background of a window... extreamly simple thing... unfortunatly I just recently started writing UI code so I have no clue why what I am trying to do does not work... I simply try calling
pDC->SetBkColor(RGB(192,192,192));
to set the background of a window to light gray.... but when I run the application nothing at all happens... its still white!
I also needed to paint a small light gray rectangle and I tried doing
CBrush* brsh = NULL;
brsh = (CBrush*)pDC->SelectStockObject(GRAY_BRUSH);
pDC->FillRect(rctRoomNum, brsh);
to fill a recatngle with a gray color... it doesn't work... if I try instead of the call to GetStockObject a call like "brsh = new CBrush(&bmpStat);" it fills that rectangle with the bitmap.... I am very frustrated with trying to make this thing work... can someone please help me... I am sure its something very simple...
Thanx
Stou
pDC->SetBkColor(RGB(192,192,192));
to set the background of a window to light gray.... but when I run the application nothing at all happens... its still white!
I also needed to paint a small light gray rectangle and I tried doing
CBrush* brsh = NULL;
brsh = (CBrush*)pDC->SelectStockObject(GRAY_BRUSH);
pDC->FillRect(rctRoomNum, brsh);
to fill a recatngle with a gray color... it doesn't work... if I try instead of the call to GetStockObject a call like "brsh = new CBrush(&bmpStat);" it fills that rectangle with the bitmap.... I am very frustrated with trying to make this thing work... can someone please help me... I am sure its something very simple...
Thanx
Stou