Themed TGet on windows (fixed)

Themed TGet on windows (fixed)

Postby Roberto Parisi » Mon Oct 31, 2005 9:58 am

I can't obtain themed edit box on windows.

See the code below:

#include "fivewin.ch"

procedure main()
local oDlg, cText := Space(30)
define window oDlg title "Test" from 10,10 to 300,300 pixel
@1,1 get cText of oDlg size 200,20
activate window oDlg
return

The edit box has a black border instead the theme blue border.

It only happens with window, if I change the "define/activate window" with "define/activate dialog" it looks fine.

Antonio, I post this problem the first time in July 2004, please make my app full xp themed :)

Regards,
Roberto Parisi
Roberto Parisi
 
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Postby Antonio Linares » Mon Oct 31, 2005 3:39 pm

Roberto,

We have been today more than one hour trying to fix it.

No luck yet :(
regards, saludos

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

Postby Roberto Parisi » Sat Nov 05, 2005 3:18 pm

Thx Antonio,

I tried it by myself with no luck after 4 hours. :( (I'm curious how XChangeProc works)

Now I'm trying with non client area painting. I hope to find a trick for this problem.

Regards,
Roberto Parisi
Roberto Parisi
 
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Postby Antonio Linares » Sat Nov 05, 2005 4:07 pm

Roberto,

We keep trying it here, so hopefully we may find a solution for it.
regards, saludos

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

Postby Antonio Linares » Mon Nov 07, 2005 5:20 am

Roberto,

Its fixed! :) Thanks to Master Hernan Diego!

Just changes these lines,

winapi\mgetcrea.c:

#ifndef UNICODE
_retnl( ( LONG ) CreateWindowEx( WS_EX_CLIENTEDGE,
_parc( 1 ), ...

classes\tget.prg:

remove WS_BORDER style.
regards, saludos

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

Postby Roberto Parisi » Mon Nov 07, 2005 11:33 am

Thx Antonio but with your changes the result is an editbox without border!

Regards,
Roberto Parisi
Roberto Parisi
 
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Postby Antonio Linares » Mon Nov 07, 2005 12:26 pm

Roberto,

You may not have properly modified winapi\mgetcrea.c. Or maybe did not linked in properly or replaced it in the lib.

Please check it. Its working fine and confirmed by some users.
regards, saludos

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

Postby Roberto Parisi » Mon Nov 07, 2005 5:59 pm

Ok, it works. CLIPPER declaration in my mgetcreate.c was dropping the underscore, with HB_FUNC it works.

Many thx to you and Herman Diego

Roberto Parisi
Roberto Parisi
 
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

changes

Postby Maverich » Mon Dec 05, 2005 10:41 am

Antonio,
I don't understand what are the fixes I need in classes/tget.prg.
WS_Border appears in the lines:
Code: Select all  Expand view  RUN
WS_Border appears in the lines:

   ::nStyle    = nOR( WS_CHILD, WS_VISIBLE,;
                      ES_AUTOHSCROLL, WS_BORDER,;
                      If( ! lReadOnly, WS_TABSTOP, 0 ),;
                      If( lDesign, WS_CLIPSIBLINGS, 0 ),;
                      If( lSpinner, WS_VSCROLL, 0 ),;
                      If( lReadOnly, ES_READONLY, 0 ),;
                      If( lCenter, ES_CENTER, If( lRight, ES_RIGHT, ES_LEFT ) ) )
//                      If( lCenter .OR. lRight, ES_MULTILINE, 0 ),; Only needed for Win31

   ::nStyle    = If( lNoBorder, nAnd( ::nStyle, nNot( WS_BORDER ) ), ::nStyle )


thanks
Riccardo
User avatar
Maverich
 
Posts: 31
Joined: Sun Oct 09, 2005 8:29 pm
Location: Prato, Italia

Postby Antonio Linares » Mon Dec 05, 2005 12:06 pm

Riccardo,

WS_BORDER has to be removed and in source\winapi\mgetcrea.c:

BOOL lIsAppThemed = FALSE;

...

BOOL _IsAppThemed( void );

lIsAppThemed = _IsAppThemed();

_retnl( ( LONG ) CreateWindowEx( lIsAppThemed ? WS_EX_CLIENTEDGE: 0,
...
regards, saludos

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

Postby Antonio Linares » Tue Dec 06, 2005 9:29 am

This fix for Class TGet Method New(...) seems to be a better one:

Code: Select all  Expand view  RUN
   ...

   ::nStyle    = nOR( WS_CHILD, WS_VISIBLE,;
                      ES_AUTOHSCROLL,;
                      If( ! lReadOnly, WS_TABSTOP, 0 ),;
                      If( lDesign, WS_CLIPSIBLINGS, 0 ),;
                      If( lSpinner, WS_VSCROLL, 0 ),;
                      If( lReadOnly, ES_READONLY, 0 ),;
                      If( lCenter, ES_CENTER, If( lRight, ES_RIGHT, ES_LEFT ) ) )

   #ifdef __CLIPPER__
      if ! lNoBorder
         ::nStyle = nOr( ::nStyle, WS_BORDER )
      endif   
   #else
      if ! IsAppThemed()
         ::nStyle = nOr( ::nStyle, WS_BORDER )
      else
         ::nStyle = nOr( ::nStyle, If( oWnd:ChildLevel( TDialog() ) != 0, WS_BORDER, 0 ) )
      endif     
   #endif   

regards, saludos

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

a clear patch!

Postby Maverich » Wed Dec 07, 2005 5:26 pm

Sorry Antonio, I continue not to understand.
In your Nov,7 message you said to update winapi\mgetcrea.c and classes\tget.prg.
Now you add another correction to mgetcrea.c and another to tget.prg.
How is the definitive patch?
could you please send me the 2 files by email?

regards
Riccardo
User avatar
Maverich
 
Posts: 31
Joined: Sun Oct 09, 2005 8:29 pm
Location: Prato, Italia

Postby Antonio Linares » Wed Dec 07, 2005 6:48 pm

Riccardo,

I email you the files.
regards, saludos

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

Postby Riccardo » Tue Dec 13, 2005 2:46 pm

Antonio,
please could you also send them to me?
Or, how is possible to have the patch of the FWH 2.7?

Thank you
Riccardo
Riccardo
 
Posts: 13
Joined: Wed Dec 07, 2005 5:54 pm

Postby Antonio Linares » Wed Dec 14, 2005 7:56 am

Riccardo,

Already sent.
regards, saludos

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


Return to Bugs report & fixes / Informe de errores y arreglos

Who is online

Users browsing this forum: No registered users and 14 guests