he..yup, another one for ya'll!
I'm getting really strange behaviour by BitBlt. I use lotsa BitBlt's
in response to the WM_MOUSEMOVE message.
It looks a little something like this:
Code:
BitBlt(tempDC,0,0,
kWindowWidth,
kWindowHeight,
hDCMono,
0,
0,
SRCCOPY);
SelectObject(hDCMono,hSelectedMonoBitmap);
BitBlt(tempDC,0,0,
kWindowWidth,
kWindowHeight(yDelta),
hDCMono,
0+ConvertToTimePoint(xDelta)+kWindowWidth,
0+ConvertToPoint(yDelta),
SRCAND);
In the first BitBlt, tempDC is using a bitmap of 3 times the size as
hDCMONO does, but that shoudn't matter since it's cut by the
width and height params. In the next blt hDCMono uses a monochrome BitMap by the dimension
(0,0,kWindowWidth,kWindowHeight), the same dimensions
as the previous bitmap.
Now the question is why the first of these calls take aproximatly
60-70 ms to perform while the second only takes 10-20...?!
I performed som experiments:
I created(after many experiments) a bitmap by the dimension
800*360(kWindowHeight is 500, and width 400) and selected it into tempDC before the first blt. Now it
worked real smooth, everthing took about 20 ms. Then I changed
the BitMap to be 800*370, and I was back to were I started with my 70 msec.
ohhhhhh... why is it like this!!?
I guess my real question is: what affects BitBlt's performance?
any help is greatly apriciated
take care
/btq