Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InvalidateRect in windows Me?

Status
Not open for further replies.

msdawy2

Programmer
Jan 8, 2004
10
EG
Hello...
I am having a weird problem... I have written a program (MDI) in visual c++ 6, it runs great in win2000 and XP. But in win Me, i tried it today, and i got shocked!

InvalidateRect() does not work correctly. When i click on something, it should get selected, I invalidate the rectangle around it, but in Me, it doesn't work! I have to minimize and maximize, or click several times for it to understand the InvalidateRect..

Why does it do this?
Any help would be greatly appreciated...
Thank you very much in advance....
 
Try after InvalidateRect to call UpdateWindow. InvalidateRect invalidates a portion, but draws nothing. So, drawing is fired when window receives WM_PAINT, a message with very low priority.

Ion Filipski
1c.bmp
 
Thank you very much for your reply...
But, i tried it and... nothing changed! the behavior remained the same...
Is there any other way to FORCE a redraw now?

Thank you very much in advance..
 
try to sent the message WM_PAIT with using SendMessage

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top