Page 1 of 1

MDICHILD windows draw slowly

Posted: Wed Mar 08, 2006 5:05 am
by E. Bartzokas
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

Posted: Wed Mar 08, 2006 8:47 am
by Antonio Linares
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

Posted: Wed Mar 08, 2006 1:27 pm
by E. Bartzokas
Thanks Antonio,
I will try it and let you know.
regards
Evans

Posted: Wed Mar 08, 2006 5:43 pm
by James Bott
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

Posted: Wed Mar 08, 2006 8:30 pm
by E. Bartzokas
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

Posted: Wed Mar 08, 2006 8:35 pm
by James Bott
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

Posted: Wed Mar 08, 2006 9:32 pm
by carlos vargas
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

function main()
    ...
    OverrideAndExtend()
    ...
    DEFINE WINDOW ....
    ACTIVATE WINDOW ...

return nil

Code: Select all

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

Posted: Wed Mar 08, 2006 9:49 pm
by E. Bartzokas
James,
Thanks!

Carlos,
Gracias!

regards/saludos
Evans