> -----Original Message-----
> From: David Fedor [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 17, 1999 1:15 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Custom draw list display problem
> 
> 
> Instead of putting a ton of erase/draw/fiddle calls in, to 
> hopefully mask
> whatever the root cause is, how about finding out what is causing the
> trouble?  I'm sure you've tried to figure it out, Richard, 
> but perhaps I
> can be of some help.

Thanks, but I found it.  The template code I was using for 
implementing the custom draw list(from the Rhodes book) had 
a MainViewInit() that looked like this:

        static void MainViewInit(void)
        {
           FormPtr        frm = FrmGetActiveForm();
   
        //...
              ListPtr  list = FrmGetObjectPtr(frm, 
           FrmGetObjectIndex(frm, MainMyList));
        //...
              LstSetDrawFunction(list, ListDrawFunc);
        //...

           // Draw the form.
           FrmDrawForm(frm);
        }
        

and the frmOpenEvent that I was using looked like this:

        case frmOpenEvent:
                MainViewInit();
                frm = FrmGetActiveForm();
                FrmDrawForm(frm);
                break;

This resulted in FrmDrawForm() being called twice ... when
I made the form init function -just- initialize the form
elements, and not also try to draw it, things worked out
just fine.

So, a question: -why- would calling FrmDrawForm() twice
result in this sort of problem anyway?  Shouldn't it draw
the same way both times?

-- 
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi./sec ... not just a good idea, it's the LAW!

Reply via email to