InValidateRect not working as expected- Please Help ! - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

InValidateRect not working as expected- Please Help !

am drawing 2 small square BMP images ( Image1 and Image2) on the screen via the [b]BitBlt[/b][italic][/italic] API and it works fine.

However, when i try erasing Image1 using the [b]InValidateRect[/b][italic][/italic][color=Red][/color] API by passing the exact Rect value of Image1 the entire screen gets redrawn and Image2 is erased too not just Image1 like I want.


[code]Dim R As RECT

R.Left = Image1.Left
R.Top = Image1.Top
R.Right = Image1.Right
R.Bottom = Image1.Bottom

InvalidateRect 0, R, True [color=Green]'Not working - Redraws the entire screen[/color][/code]
How can i redraw a specific RECT via the [b]InValidateRect[/b][italic][/italic] API ?

Sign In or Register to comment.