FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Resource Editor problem with TGET (GetBtn) *Worked OK now*
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Resource Editor problem with TGET (GetBtn) *Worked OK now*
Posted: Sun Feb 08, 2009 12:02 AM
Dear Antonio and All,

I used BRW since FW2.5 and convert to 32bits. I've to use RESIZE16 clause when I use with FWH 9.01. Then when I use TGET (GetBtn-FWH) the Button does align incorrectly. I've changed the original classes as following to fix alignment. It works fine but I don't like to change original classes. :-)
/*       @ 0, ::nWidth - ::nHeight BUTTONBMP ::oBtn OF Self ;
            ACTION ( Eval( oThis:bAction, oThis ), oThis:SetFocus() ) ;
            SIZE ::nHeight - 4, ::nHeight - 4 PIXEL  
*/
         @ 0, ( ::nWidth * 1.167 ) - ::nHeight BUTTONBMP ::oBtn OF Self ;
            ACTION ( Eval( oThis:bAction, oThis ) ) ;
            SIZE ::nHeight - 5, ::nHeight - 5 PIXEL

1. What is the way that make resource to use FWH 32bits without use RESIZE16 (I shall not change TGET code)?
2. How can I change TGET classes to compatible with RESIZE16 and without RESIZE16?

Regards,
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resource Editor problem with TGET (GetBtn)
Posted: Sun Feb 08, 2009 12:36 AM
Dutch,

We can implement your fix this way:
if ! ::lResize16
   @ 0, ::nWidth - ::nHeight BUTTONBMP ::oBtn OF Self ;
      ACTION ( Eval( oThis:bAction, oThis ), oThis:SetFocus() ) ;
      SIZE ::nHeight - 4, ::nHeight - 4 PIXEL  
else
   @ 0, ( ::nWidth * 1.167 ) - ::nHeight BUTTONBMP ::oBtn OF Self ;
      ACTION ( Eval( oThis:bAction, oThis ) ) ;
      SIZE ::nHeight - 5, ::nHeight - 5 PIXEL
endif

Please try it and if it is fine for you, then we will include it for next FWH build :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Resource Editor problem with TGET (GetBtn)
Posted: Sun Feb 08, 2009 01:02 AM
Dear Antonio,

::lResize16 is Dialog DATA. It is not exist in TGET. If I'm not wrong, Dialog will be resize all object in DIALOG ACTIVATE.
How can TGET will know ::lResize16?

Regards,
Dutch
Antonio Linares wrote:Dutch,

We can implement your fix this way:
if ! ::lResize16
   @ 0, ::nWidth - ::nHeight BUTTONBMP ::oBtn OF Self ;
      ACTION ( Eval( oThis:bAction, oThis ), oThis:SetFocus() ) ;
      SIZE ::nHeight - 4, ::nHeight - 4 PIXEL  
else
   @ 0, ( ::nWidth * 1.167 ) - ::nHeight BUTTONBMP ::oBtn OF Self ;
      ACTION ( Eval( oThis:bAction, oThis ) ) ;
      SIZE ::nHeight - 5, ::nHeight - 5 PIXEL
endif

Please try it and if it is fine for you, then we will include it for next FWH build :-)
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resource Editor problem with TGET (GetBtn)
Posted: Sun Feb 08, 2009 07:35 AM
Dutch,

My mistake, sorry. I meant this code:
if Upper( ::oWnd:ClassName() ) == "TDIALOG"
   if ! ::oWnd:lResize16
      ...
   ...
      ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Resource Editor problem with TGET (GetBtn)
Posted: Sun Feb 08, 2009 02:05 PM

Dear Antonio,

I work fine perfect now.

Thanks&Regards,
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resource Editor problem with TGET (GetBtn)
Posted: Mon Feb 09, 2009 08:04 AM
Dutch,

This solution may be simpler and we don't need to modify the existing code:
METHOD CreateButton() CLASS TGet

      ... the button is created ...

      if Upper( ::oWnd:ClassName() ) == "TDIALOG" .and. ::oWnd:lResize16
         ::oBtn:nWidth  = ::nHeight - 5
         ::oBtn:nHeight = ::nHeight - 5
         ::oBtn:nLeft   = ( ::nWidth * 1.167 ) - ::nHeight
      endif   

      ...

I appreciate your feedback, thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Resource Editor problem with TGET (GetBtn)
Posted: Wed Feb 11, 2009 05:52 PM
Dear Antonio,

Antonio Linares wrote:Dutch,

This solution may be simpler and we don't need to modify the existing code:
METHOD CreateButton() CLASS TGet

      ... the button is created ...

      if Upper( ::oWnd:ClassName() ) == "TDIALOG" .and. ::oWnd:lResize16
         ::oBtn:nWidth  = ::nHeight - 5
         ::oBtn:nHeight = ::nHeight - 5
         ::oBtn:nLeft   = ( ::nWidth * 1.167 ) - ::nHeight
      endif   

      ...

I appreciate your feedback, thanks :-)


How can I add this line into Fiveh.lib (I've used Harbour (FTDN) now)?

Thanks&regards,
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resource Editor problem with TGET (GetBtn)
Posted: Wed Feb 11, 2009 07:46 PM

Dutch,

You can modify FWH\source\classes\tget.prg and compile it and link it as another PRG of your application.

Or once you have the compiled OBJ then replace it in FiveHC.lib using tlib.exe

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Resource Editor problem with TGET (GetBtn)
Posted: Thu Feb 12, 2009 03:48 PM
Dear Antonio,

I use this batch file but it is not successful.

@ECHO OFF
CLS
set hdir=d:\harbour
set bcdir=d:\bcc55\bin

%hdir%\bin\harbour TGET.PRG /n /id:\fwh\include;%hdir%\include /oTGET.C
%bcdir%\bcc32 -M -c -D__HARBOUR__ -I%hdir%\include  -oTGET.OBJ  TGET.C

%bcdir%\tlib d:\fwh\lib\fivehc.lib + TGET.OBJ

Antonio Linares wrote:Dutch,

You can modify FWH\source\classes\tget.prg and compile it and link it as another PRG of your application.

Or once you have the compiled OBJ then replace it in FiveHC.lib using tlib.exe


Thanks&Regards,
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Resource Editor problem with TGET (GetBtn)
Posted: Fri Feb 13, 2009 05:54 PM
Dear Antonio,

I still try but not successful.

Regards,
Dutch
dutch wrote:Dear Antonio,

I use this batch file but it is not successful.

@ECHO OFF
CLS
set hdir=d:\harbour
set bcdir=d:\bcc55\bin

%hdir%\bin\harbour TGET.PRG /n /id:\fwh\include;%hdir%\include /oTGET.C
%bcdir%\bcc32 -M -c -D__HARBOUR__ -I%hdir%\include  -oTGET.OBJ  TGET.C

%bcdir%\tlib d:\fwh\lib\fivehc.lib + TGET.OBJ

Antonio Linares wrote:Dutch,

You can modify FWH\source\classes\tget.prg and compile it and link it as another PRG of your application.

Or once you have the compiled OBJ then replace it in FiveHC.lib using tlib.exe


Thanks&Regards,
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Resource Editor problem with TGET (GetBtn) *Worked Now*
Posted: Fri Feb 13, 2009 06:26 PM
Dear Antonio,

It must replace in FIVEH.LIB instead of FIVEHC.LIB. It works as expectation now.

Regards,
Dutch

Antonio Linares wrote:Dutch,

You can modify FWH\source\classes\tget.prg and compile it and link it as another PRG of your application.

Or once you have the compiled OBJ then replace it in FiveHC.lib using tlib.exe
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resource Editor problem with TGET (GetBtn) *Worked OK now*
Posted: Fri Feb 13, 2009 09:25 PM

Dutch,

Yes, you are right, my mistake. FiveHC.lib is only for compiled C modules.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Resource Editor problem with TGET (GetBtn) *Worked OK now*
Posted: Sat Feb 14, 2009 02:26 PM

Dear Antonio,

Thanks for your kindness help.
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)

Continue the discussion