Re: Graphics "goes away"

Tech-Archive recommends: Speed Up your PC by fixing your registry



You mention that you use MoveToEx and LineTo... do these return true or
false?

When this happens, can you place a breakpoint in your code and see where the
points are (maybe the points are off the screen or invalid in some way)?

Can you post any of the drawing code?

Are you drawing in a WM_PAINT block or directly to the dialog? If WM_PAINT,
are you calling BeginPaint/EndPaint?

Chris


"jw" <jw@xxxxxxxxxxxxx> wrote in message
news:amlke.2774$yO1.2136@xxxxxxxxxxx
>I have written a program in C that generates up to 100 data points and
> plots a line to a Dialog within a Tabbed Folder using MoveToEx() -
> LineTo()
> functions.
> The program can plot up to 1000 of these lines on the graph.
> My problem is that on my XP SP1 machine sometimes the program simply stops
> drawing at some point.
> Sometimes after around 150 lines and sometimes after over 500 lines --
> it's
> not the same each time.
> Most of the time it doesn't stop at all and draw all 1000 lines. And it
> is
> not crashing -- if I wait the program comes back after it would normally
> have plotted all of the lines.
> It seems as if the program decided it doesn't want to show the lines
> anymore
> or is drawing them off screen somewhere. I'm pretty sure that isn't
> happening because I can set it to plot the same 1000 lines. Most of the
> time it does -- every now and then it doesn't
> Does anyone have any suggestions, as to what is happening. The code is
> calculation intensive and scattered over many thousands of lines of C and
> many- many functions.
> Is it an XP thing where I need to do something to keep XP from swapping it
> out? It happens even if it is the only application running.
>
> Thanks for any direction.
>
> JW
>
>


.



Relevant Pages

  • Re: Graphics "goes away"
    ... > You mention that you use MoveToEx and LineTo... ... > Are you drawing in a WM_PAINT block or directly to the dialog? ... >> The program can plot up to 1000 of these lines on the graph. ... I am in a WM_PAINT and I do use BeginPaint and EndPaint. ...
    (microsoft.public.win32.programmer.gdi)
  • Graphics "goes away"
    ... plots a line to a Dialog within a Tabbed Folder using MoveToEx() - LineTo ... The program can plot up to 1000 of these lines on the graph. ... or is drawing them off screen somewhere. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Graphics "goes away" - New Information
    ... > The program can plot up to 1000 of these lines on the graph. ... > or is drawing them off screen somewhere. ... after about 75 lines it stops showing the lines. ... monitored KILLFOCUS but it does not seem like I get it right away. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Strange CDC::MoveTo and CDC::MoveTo performance problem
    ... If you are redrawing the entire screen everytime the mouse moves 4 pixels, ... you are drawing alot, I am sure drawing 4000 lines take a while no matter ... will invoke MoveTo and LineTo about 4000 times. ...
    (microsoft.public.vc.mfc)
  • Re: Graphics "goes away"
    ... deleting them? ... Chris ... > The program can plot up to 1000 of these lines on the graph. ... > or is drawing them off screen somewhere. ...
    (microsoft.public.win32.programmer.gdi)