MDICHILD windows draw slowly

Post Reply
User avatar
E. Bartzokas
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

MDICHILD windows draw slowly

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
E. Bartzokas
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Post by E. Bartzokas »

Thanks Antonio,
I will try it and let you know.
regards
Evans
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
User avatar
E. Bartzokas
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Post 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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
User avatar
carlos vargas
Posts: 1421
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Post 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
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
E. Bartzokas
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Post by E. Bartzokas »

James,
Thanks!

Carlos,
Gracias!

regards/saludos
Evans
Post Reply