skinbuttons problem

skinbuttons problem

Postby Richard Chidiak » Tue Sep 07, 2010 1: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: skinbuttons problem

Postby Antonio Linares » Wed Sep 08, 2010 8:55 am

Richard,

We are testing this example on Windows 7 32 bits and it seems to work fine:
Code: Select all  Expand view
#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:

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

Re: skinbuttons problem

Postby Richard Chidiak » 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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: skinbuttons problem

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

Re: skinbuttons problem

Postby Richard Chidiak » 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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: skinbuttons problem

Postby Antonio Linares » Wed Sep 08, 2010 11:43 am

Richard,

I have tested it this way and it is working fine. How have you tested it ?
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 41406
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: skinbuttons problem

Postby Richard Chidiak » 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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: skinbuttons problem

Postby Antonio Linares » Wed Sep 08, 2010 1:24 pm

Richard,

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

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

Re: skinbuttons problem

Postby Richard Chidiak » Wed Sep 08, 2010 1: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: skinbuttons problem

Postby Richard Chidiak » Wed Sep 08, 2010 1: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: skinbuttons problem

Postby Enrico Maria Giordano » Wed Sep 08, 2010 5:01 pm

Another problem is illustrated by the following sample:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8378
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: skinbuttons problem

Postby Antonio Linares » Wed Sep 08, 2010 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41406
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: skinbuttons problem

Postby Antonio Linares » Wed Sep 08, 2010 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41406
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: skinbuttons problem

Postby Antonio Linares » Wed Sep 08, 2010 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41406
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: skinbuttons problem

Postby fraxzi » 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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 37 guests