FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MDICHILD windows draw slowly
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
MDICHILD windows draw slowly
Posted: Wed Mar 08, 2006 05: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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
MDICHILD windows draw slowly
Posted: Wed Mar 08, 2006 08: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
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
MDICHILD windows draw slowly
Posted: Wed Mar 08, 2006 01:27 PM

Thanks Antonio,
I will try it and let you know.
regards
Evans

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
MDICHILD windows draw slowly
Posted: Wed Mar 08, 2006 05: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
MDICHILD windows draw slowly
Posted: Wed Mar 08, 2006 08: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
MDICHILD windows draw slowly
Posted: Wed Mar 08, 2006 08: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
MDICHILD windows draw slowly
Posted: Wed Mar 08, 2006 09: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

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

return nil


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)
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
MDICHILD windows draw slowly
Posted: Wed Mar 08, 2006 09:49 PM

James,
Thanks!

Carlos,
Gracias!

regards/saludos
Evans

Continue the discussion