hi,
i'm filling my window like the following code snippet shows:
invoke CreateSolidBrush,00FFFFFFh
mov wc.hbrBackground, eax
the window should be white now, right?
ok, i'm using backbuffering in that program. every time i update the screen i fill my backbuffer with black, paint the new things on it and copy the backbuffer to my main window's dc with BitBlt. to fill the backbuffer with black i use FillRect. everything works fine. but i've chosen the rectangle so that there should be a white border around the window. do you know what i mean? the rectangle is 5 pixel on every side smaller than the whole window. but the border only appears on the bottom and on the right of the window. above and left, there is a border too, but filled with different colors of pixels. i asked a friend to check the program and above and left there was a black instead of a white border, but why? can you help?
snippet of rectangle filling:
mov screenrect.left,5
mov screenrect.top,5
mov eax,Wwd
sub eax,5
mov screenrect.right,eax
mov eax,Wht
sub eax,5
mov screenrect.bottom,eax
invoke CreateSolidBrush,00000000h
mov blackbrush,eax
invoke FillRect, backbuffer, ADDR screenrect, blackbrush
If your border is 5 pixels in width, then you need to subtract 10 off the width (you have two borders left & right, or top & bottom).
Mirno