|
-
July 10th, 1999, 05:35 AM
#1
Background of Windows..
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
-
July 11th, 1999, 07:27 PM
#2
Re: Background of Windows..
Look in to Erasing the window Background in the WM_ERASEBKGND message handler, This is where you should try your code that you mentioned.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|