Resource Editor problem with TGET (GetBtn) *Worked OK now*

Resource Editor problem with TGET (GetBtn) *Worked OK now*

Postby dutch » 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. :?:
Code: Select all  Expand view
/*       @ 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
Last edited by dutch on Fri Feb 13, 2009 6:27 pm, edited 1 time in total.
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Resource Editor problem with TGET (GetBtn)

Postby Antonio Linares » Sun Feb 08, 2009 12:36 am

Dutch,

We can implement your fix this way:
Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 41365
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Resource Editor problem with TGET (GetBtn)

Postby dutch » Sun Feb 08, 2009 1: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:
Code: Select all  Expand view
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 19.01 / 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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Resource Editor problem with TGET (GetBtn)

Postby Antonio Linares » Sun Feb 08, 2009 7:35 am

Dutch,

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

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

Re: Resource Editor problem with TGET (GetBtn)

Postby dutch » Sun Feb 08, 2009 2:05 pm

Dear Antonio,

I work fine perfect now.

Thanks&Regards,
Dutch
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Resource Editor problem with TGET (GetBtn)

Postby Antonio Linares » Mon Feb 09, 2009 8:04 am

Dutch,

This solution may be simpler and we don't need to modify the existing code:
Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 41365
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Resource Editor problem with TGET (GetBtn)

Postby dutch » Wed Feb 11, 2009 5:52 pm

Dear Antonio,

Antonio Linares wrote:Dutch,

This solution may be simpler and we don't need to modify the existing code:
Code: Select all  Expand view
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 19.01 / 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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Resource Editor problem with TGET (GetBtn)

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

Re: Resource Editor problem with TGET (GetBtn)

Postby dutch » Thu Feb 12, 2009 3:48 pm

Dear Antonio,

I use this batch file but it is not successful.

Code: Select all  Expand view
@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 19.01 / 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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Resource Editor problem with TGET (GetBtn)

Postby dutch » Fri Feb 13, 2009 5: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.

Code: Select all  Expand view
@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 19.01 / 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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Resource Editor problem with TGET (GetBtn) *Worked Now*

Postby dutch » Fri Feb 13, 2009 6: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 19.01 / 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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Resource Editor problem with TGET (GetBtn) *Worked OK now*

Postby Antonio Linares » Fri Feb 13, 2009 9:25 pm

Dutch,

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

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

Re: Resource Editor problem with TGET (GetBtn) *Worked OK now*

Postby dutch » Sat Feb 14, 2009 2:26 pm

Dear Antonio,

Thanks for your kindness help.
Dutch
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 17 guests