Hi Manjesh Gowda,
"Manjesh Gowda" <ma********@hotmail.com> schrieb im Newsbeitrag
news:e5**************************@posting.google.c om...
I am using StretchDiBits to convert the DIB bitmap to Device context
of my window. It has some problem , sometimes it fails to paint the
form DC whenever i move the mouse over it get repainted. I even tried
using SetDIBitsToDevice , but it didn't help Is there i need to do ,
make this work , here is the code
ret=SetDIBitsToDevice(dc,mRect.left,mRect.Top,mWid th,mHeight,0,0,0,mHeight,p
Bits,bInfo,DIB_RGB_COLORS);
You should probably post this in one of the Windows programming newsgroups.
But anyway, from what you're saying it seems you don't do the painting in
the WM_PAINT handling, as it should be. You should never draw to a window
outside WM_PAINT handling (between a BeginPaint() and EndPaint() bracket).
To trigger a window repaint, use InvalidateRect() with a RECT pointer of
NULL. The window receives a WM_PAINT message then when the system is ready
for it.
I hope this helps.
Regards,
Ekkehard Morgenstern.