-
Wiped.
No, I'm not done bothering you yet.
My windowed DX7 app has a bit of a problem: Every time another window passes overhead the image on the form gets wiped out, or at the very least wiped out where the other window touched it. I have Autoredraw on the form set to true, but to no avail. Is there a way to keep this from happening, short of refreshing the window 60 times a second?
~Zero the Inestimable
-
Nope, there is no way to stop this from happening. DirectX turns AutoRedraw off before starting up, for speed.
Z.
-
...
Hmm. This is bad.
I just tried doing it with BlittoDC. Hoo boy. The whole redraw operation at 1600x1200 takes 540 msec. With DirectX, it takes 12. This, kids, is the advantage of DirectX.
So if disabling picture wipe is impossible, perhaps I can fire a redraw when the display is clipped? I can't think of a way to do this off the top of my head. Suggestions are welcome, if anyone has an idea...
Maybe I'll just refresh every half second and live with it. If the picture is wiped it won't stay wiped for long.
~Zero the Inestimable
-
well can't you put in some code for refreshing to whole picture again in the form_paint event? (maybe it would call itself again so you would need to block that)
-
...
Doesn't seem to do the trick.
I've cut my redraw time down to an average of 5 ms (\/\/00T!) and thus I have a timer that just repaints every 1/4 of a second. Seems to do the trick.
While you're actually working with the application this isn't a problem at all, but if you start dragging stuff over it things get ugly. Now, things stay ugly for a split second and then un-ugly themselves automatically. You really don't notice it unless you look for it, now.
~Zero the Inestimable
-
hm sorry that I could not help out
but one more thing: if you are using a loop kill the timer. if not I guess even the Evil[tm] timer will do it.
-
...
No loops. This isn't a game, so I can get away with passive refreshing. That's what I'm after, here, anyway. At this point it's mostly-passive refreshing, since it always refreshes four times a second anyway...
~Zero the Inestimable
-
yeah I am still wondering why the paint event does not work?
isn't it triggered or where is the problem with it?
-
Maybe the paint event isn't raised by just switching between two open windows. You may want to put code into the GotFocus event. That way when you get the focus back after losing it you can redraw your screen at the correct time.
There's my 2 cents worth.
Drewski