MDICHILD windows draw slowly

MDICHILD windows draw slowly

Postby E. Bartzokas » Wed Mar 08, 2006 5:05 am

Hi all,
We have one MDI window that draws fine (has no buttonbar)
and about 12 MDICHILDren windows (with button bars, all of them)
that draw very slowly.
In 16-bits, this slowlyness was not visible, but now it is.

Thanks for any advise/hints
Regards
Evans
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby Antonio Linares » Wed Mar 08, 2006 8:47 am

Evans,

The slowness is caused by the "double buffer" painting technique that avoids "flickering" when you redimension a window.

In order to avoid this technique and improve speed, you may change these two methods in window.prg like this:

METHOD DispBegin() VIRTUAL
METHOD DispEnd() VIRTUAL
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42119
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby E. Bartzokas » Wed Mar 08, 2006 1:27 pm

Thanks Antonio,
I will try it and let you know.
regards
Evans
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby James Bott » Wed Mar 08, 2006 5:43 pm

Evans,

My suggestion would to be dump MDI and switch to SDI (Single Document Interface) like Outlook. It is much easier for the user.

You could probably eliminate 11 of the 12 toolbars and the users don't have to manipulate all those windows.

MDI is really better for things like documents where they are all the same item, rather than databases where each one is different.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby E. Bartzokas » Wed Mar 08, 2006 8:30 pm

James Bott wrote:Evans,

My suggestion would to be dump MDI and switch to SDI (Single Document Interface) like Outlook. It is much easier for the user.

You could probably eliminate 11 of the 12 toolbars and the users don't have to manipulate all those windows.

MDI is really better for things like documents where they are all the same item, rather than databases where each one is different.

James


James, thanks for the advise.
Is there any available example I can check out that comes with FWH ?

-For Antonio...
Antonio, I tried the VIRTUAL clause in WINDOW.PRG
but didn't see any drastic change, however, I have modified the way that I initially draw the window (now I draw them directly to the size of the monitor, and use a white brush (CLR_WHITE) in all of my MDICHILD window, thus, it appears a little better in speed, and doesn't flicket that much.... Therefore, I retain WINDOW.PRG unchanged.

Thank you all and regards/saludos
Evans
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby James Bott » Wed Mar 08, 2006 8:35 pm

Evans,

>Is there any available example I can check out that comes with FWH ?

Look at \samples\testspl1.prg - testspl6.prg for splitter examples.

Also look at the TOutlook class.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby carlos vargas » Wed Mar 08, 2006 9:32 pm

si se usa xharbour eliminar el doblebuffer es sencillo, sin modificar la clase twindow, solo se agrega el siguiente codigo

al inicio de tua apliacion llama a

Code: Select all  Expand view  RUN
function main()
    ...
    OverrideAndExtend()
    ...
    DEFINE WINDOW ....
    ACTIVATE WINDOW ...

return nil


Code: Select all  Expand view  RUN
PROCEDURE OverrideAndExtend()
   OVERRIDE METHOD DispBegin IN CLASS TWindow WITH KDispBegin
   OVERRIDE METHOD DispEnd   IN CLASS TWindow WITH KDispEnd
RETURN

STATIC FUNCTION KDispBegin()
   LOCAL SELF := HB_QSelf()
RETURN SELF

STATIC FUNCTION KDispEnd()
   LOCAL SELF := HB_QSelf()
RETURN NIL
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1721
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Postby E. Bartzokas » Wed Mar 08, 2006 9:49 pm

James,
Thanks!

Carlos,
Gracias!

regards/saludos
Evans
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Antonio Linares and 52 guests