It seems that background is not full repainted each time
So there is no way to draw objects via GDI right !
If you change a position of a already draw object some old part of it will be still displayed.
We can not restore the old part of object background because MC give us only access
"AfterBGFill"-event and we never know when the whole background was fresh repainted.
ciao
radekj
PS: simple exampel, draw a current close-price near close via "g.DrawString()"
GDI background problem [SOLVED]
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: GDI background problem [SOLVED]
Hello radekj,
MC .NEt always returns the coordinates of the area that will be repainted via DrawContext.DrawRect. You should check if your object is located in the repainted area. Background is repainted only where it is needed. To tell MC .NET that some are should be repainted, you should pass its coordinates via the DrawContext.DirtyRect property.
MC .NEt always returns the coordinates of the area that will be repainted via DrawContext.DrawRect. You should check if your object is located in the repainted area. Background is repainted only where it is needed. To tell MC .NET that some are should be repainted, you should pass its coordinates via the DrawContext.DirtyRect property.
Re: GDI background problem
Does not work !
i draw text on old-position (say rect is 100,100, 110, 110),
than i redraw it at new position (say rect is 100, 110, 110, 120)
and setting "context.DirtyRect" to old-position-text (Rect) and
nothing happens, same if i use "context.ReDraw = true".
I still see part of old text.
ciao
radekj
PS: link with snap of it :
http://screencast.com/t/2UXXtE72G
i draw text on old-position (say rect is 100,100, 110, 110),
than i redraw it at new position (say rect is 100, 110, 110, 120)
and setting "context.DirtyRect" to old-position-text (Rect) and
nothing happens, same if i use "context.ReDraw = true".
I still see part of old text.
ciao
radekj
PS: link with snap of it :
http://screencast.com/t/2UXXtE72G
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times