FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour skinbuttons problem
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM

skinbuttons problem

Posted: Tue Sep 07, 2010 01:14 PM

Antonio

When activating skinbuttons() , the process keeps growing and growing and the memory blows after a while

Removing skinbuttons() everything goes back to normal

FWH 10.7 windows seven 64 bits (problem occuring on xp and vista also)

Regards

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 08:55 AM
Richard,

We are testing this example on Windows 7 32 bits and it seems to work fine:
#include "FiveWin.ch"

function Main()

   local oDlg

   SkinButtons()

   DEFINE DIALOG oDlg

   @ 2, 2 BUTTON "OK"

   ACTIVATE DIALOG oDlg CENTERED

   CheckRes()

return nil


The generated checkres.txt file is clean. Also, the task manager shows constant values:


Please notice that "USER objects" and "GDI objects" for test.exe remain constant.

Surely we need to find another example where we can isolate the GDI consume that you mention.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 11:15 AM

Antonio

Doing further research in my code also i found

SETSKINS(.T.)

I have commented this line and now it looks much better , maybe the cause of the problem ?

anyway , removing skinbuttons() the application is much faster responding to all controls (dialogs...)

Still searching

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 11:24 AM

Richard,

SetSkins() is implemented in source\classes\window.prg and actually it does almost nothing. It just changes the value of a static variable but it is not used from any other place.

The speed difference that you notice is due to the fact that the FWH skins use PRG code and it is not as fast as the C (or assembler) code used by Windows.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 11:33 AM

Antonio

Can you please change your test to enter the dialog more than once and check the gdi objects, you will see them growing

Just enter the dialog and exit more than once and check at exit time

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 11:43 AM
Richard,

I have tested it this way and it is working fine. How have you tested it ?
#include "FiveWin.ch"

function Main()

   local n
   
   SkinButtons()
   
   for n = 1 to 10
      Test()
   next
   
   CheckRes()
   
return nil      

function Test()

   local oDlg

   DEFINE DIALOG oDlg

   @ 2, 2 BUTTON "OK"

   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 11:48 AM

Antonio

Your test is fine, i did the same

Start the windows task manager and look at the gdi objects everytime you press on the ok button of the dialog

They keep growing

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 01:24 PM

Richard,

Could you please test it using FWH 10.8 ? thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 01:27 PM

i don't have fwh 10.8 for the moment,

I need to download it form my xp machine (fivetech's download does not work from w7 !) , i can only do this tomorrow and report back

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 01:35 PM

Antonio

from your sample test without changing anything,

did you start the task manager and check the gdi objects when clicking on OK

If gdi objects don't change (or a little) , then the problem is fixed in fwh 10.8 , in my case (10.7) the values get almost doubled ....

I will check it tomorrow though,

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 05:01 PM
Another problem is illustrated by the following sample:
#include "Fivewin.ch"

FUNCTION MAIN()

    LOCAL oDlg, oBtn

    SKINBUTTONS()

    DEFINE DIALOG oDlg

    @ 2, 2 BUTTON "&Test";
           ACTION ( oBtn:Disable(), TEST(), oBtn:Enable() )

    @ 3, 2 BUTTON oBtn PROMPT "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


STATIC FUNCTION TEST()

    LOCAL oDlg

    DEFINE DIALOG oDlg

    @ 1, 2 BUTTON "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
Try to click on Test and then on Close: the button Close lost its skin.

EMG
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 05:26 PM

Enrico,

This is a different problem.

Up to now we have not found a way to disable the skins and reenable them again

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 05:28 PM
Richard,

fivetech's download does not work from w7 !

We have just tested the download from W7 32 Ultimate and works fine.

Could some other users confirm if FWH download is working fine from W7 ? thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 05:31 PM

Richard,

We fixed a bug related to mouse capture in skins, thus the test should be done with FWH 10.8, thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 811
Joined: Tue May 06, 2008 04:28 AM

Re: skinbuttons problem

Posted: Wed Sep 08, 2010 11:34 PM

Dear Mr. Antonio and Mr. Richard,

Im using 10.6 and haven't encounter any problem with skinbutton().. im using it in xp/vista and win7.

Regards,
Frances

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15