I have drawn drawing on a dialog using CRect function with CClientDC. This drawing is set of 90 rectangles. I am updating the position of rectangles using the following code. The values of LeafA[i] value will be changes during the running time. automatically the rectangle position also should change. But updation is not happening. for that I am using InvalidateRect() function. Flickring is happening when I am using InvalidateRect() to update the rectangles position.
Please suggest if any thing is wrong or any other process to update or process for not flickering the region.
My problem is, continuously the LeafA[] values will be updated from hardware thru communication. Here the values are updating. But it is not moving. When we mnimized the screen, and restored, then the drawing is updated. But Iwant to display how it is moving. for this I use InvalidateRect() function to update the drawing. It is updating but some flickring is coming. Instead of Invalidrect(), is there any other funtion or process for this.
I don't have any idea what vcedebugger means by "Refresh()", but your flickering is probably because by default, windows erases the background first before painting anything onto the client DC. As for anything else, please post actual working code (with code tags). The above won't compile, has typos, and many missing variables/defines.
you can use CreateCompatibleDC to create a DC in memory, and use CreateCompatibleBitmap to create a client for your memory dc, and draw what you need in this memory dc, and then use BitBlt to put your content in memory dc to your client dc.
Bookmarks