Chris,

My suggestion is to break down your bitmap into a number of 
components and rewrite the code to update only whatis changed.



On 27 May 99 at 12:43, Chris Crowe wrote:

> If an application attempts to draw within a locked window, the system =
> records the extent of the attempted operation in a bounding rectangle. =
> When the window is unlocked, the system invalidates the area within this =
> bounding rectangle, forcing an eventual WM_PAINT message to be sent to =
> the previously locked window and its child windows. If no drawing has =
> occurred while the window updates were locked, no area is invalidated.=20
> 
> Looking at this - I only can do it outside of the WM_Paint event message =
> since it forces a WM_PAINT after it is unlocked.=20
> 
> I tried it and it left my window blank....
> 
> Christopher Crowe (Software Developer)
> Microsoft MVP, MCP
> 
> Adrock Software
> Byte Computer & Software LTD
> P.O Box 13-155=20
> Christchurch
> New Zealand
> Phone/Fax (NZ) 03-3651-112
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf Of McKenzie, Paul
> > Sent: Thursday, 27 May 1999 08:29
> > To: Multiple recipients of list Delphi
> > Subject: RE: [DUG]: Drawing Speed
> >=20
> >=20
> > what about using LockWindowUpdate locking.
> > ie.
> >=20
> > LockWindowUpdate(Handle);
> > DoDrawPicture;    // Your Drawing Function
> > LockWindowUpdate(0);
> >=20
> > LockWindowUpdate in the Win32.hlp - it might provide some performance
> > improvements. The picture will be all calculated and drawn while=20
> > the window
> > is locked the display will be the only thing done when the window is
> > unlocked.
> >=20
> > HTH - It might not be enough for what your after though.
> >=20
> > Regards
> > Paul
> > [EMAIL PROTECTED]
> >=20
> >=20
> > -----Original Message-----
> > From: Chris Crowe [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, 27 May 1999 08:16 AM
> > To: Multiple recipients of list Delphi
> > Subject: [DUG]: Drawing Speed
> >=20
> >=20
> > I am writing a custom scheduling control, which does a lot of=20
> > drawing to the
> > screen.
> >=20
> > Do stop flicker I have created a bitmap the size of the client area of =
> the
> > control. I then draw the interface to the bitmap, and then I draw=20
> > the bitmap
> > to the screen using Canvas.Draw(0,0, MyBitmap);
> >=20
> > I found this accetable when the control is small, but if it is say =
> getting
> > up to around 800 * 600 it takes a fair amount of time to draw. I have =
> a
> > timing component which states it takes 0.091 seconds on average=20
> > to draw the
> > image at the large screen size. You might say that it is quite fast. I
> > suppose it is. But the control must support selecting of rows and=20
> > scrolling
> > of the window, much like a listbox.=20
> >=20
> > It is very much designed around the outlook/schedule plus style=20
> > of their day
> > view for their scheduling.=20
> >=20
> > Is there a faster way of drawing to the screen?, I have to draw to the
> > bitmap becuase if I do not the screen flickers rather badly.
> >=20
> > Outlook draws very fast, and I assume my routines are quite optimized =
> but
> > obviosly not enough. So is there a better way, am I better to use=20
> > BitBlt to
> > draw to the screen than the Canvas.Draw()?
> >=20
> > Any other speed increasing tips would be greatly appreciated...
> >=20
> > ps: Does anyone know of a profiler that will profile a component,=20
> > instead of
> > the application?
> >=20
> > Chris
> >=20
> >=20
> > Christopher Crowe (Software Developer)
> > Microsoft MVP, MCP
> >=20
> > Adrock Software
> > Byte Computer & Software LTD
> > P.O Box 13-155=20
> > Christchurch
> > New Zealand
> > Phone/Fax (NZ) 03-3651-112
> >=20
> > ------------------------------------------------------------------
> > ---------
> >     New Zealand Delphi Users group - Delphi List - =
> [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > ------------------------------------------------------------------
> > ---------
> >     New Zealand Delphi Users group - Delphi List - =
> [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> >=20
> 
> ---------------------------------------------------------------------------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> 
Rohit

======================================================================
CFL - Computer Fanatics Ltd.  21 Barry's Point Road, AKL, New Zealand
PH    (649) 489-2280 
FX    (649) 489-2290
email [EMAIL PROTECTED]  or  [EMAIL PROTECTED]
======================================================================

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to