Click here to Skip to main content
15,906,455 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I can clear the Image from Rectangle of type Rect.

What I have tried:

I tried using Invalidate() it is working but flickering Issue is there.
Posted
Updated 25-Jul-16 3:07am
Comments
Patrice T 25-Jul-16 15:12pm    
Have some code ? or using magical trick ?

1 solution

Very unclear, because you havent provided how the image is displayed.

You must remove the image reference (or pointer) from the control which the image shows and than invalidate.

Or set a default image...
 
Share this answer
 
Comments
Rais Shaikh 25-Jul-16 9:20am    
Graphics gc;
gc.DrawImage(&img, rect);
And img is of type Image; I tried using Delete(img) as well as DeleteObject(img) but i m not getting proper soltuion.
Rais Shaikh 26-Jul-16 2:14am    
By using this->InvalidateRect() function we can achieve that.Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900