Problems with Checkbox
Re: Problems with Checkbox
Ciao Enrico
With fw 11.04
I insert METHOD HandleEvent() INLINE NIL in checkbox.prg
but the problem persist in radio.
Uploaded with ImageShack.us
Regards MAurizio
With fw 11.04
I insert METHOD HandleEvent() INLINE NIL in checkbox.prg
but the problem persist in radio.
Uploaded with ImageShack.us
Regards MAurizio
Last edited by Maurizio on Mon May 09, 2011 8:02 am, edited 1 time in total.
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Problems with Checkbox
Maurizio
it has worked in my tests under win7 64 bits , can you tell us what OS you are testing on ? xp ? 7 ? with themes or without ?
I had a solution modifying control prg , here it is, please report back if it fixes the problem
Hth
Richard
it has worked in my tests under win7 64 bits , can you tell us what OS you are testing on ? xp ? 7 ? with themes or without ?
I had a solution modifying control prg , here it is, please report back if it fixes the problem
Hth
Richard
Code: Select all
METHOD Colors( hDC ) CLASS TControl
DEFAULT ::nClrText := GetTextColor( hDC ),;
::nClrPane := GetBkColor( hDC ),;
::oBrush := TBrush():New( , ::nClrPane ),;
::lTransparent := .f.
SetTextColor( hDC, ::nClrText )
SetBkColor( hDC, ::nClrPane )
if ::lTransparent
SetBkMode( hDC, 1 ) // TRANSPARENT
if IsAppThemed()
if ! Empty( ::oBrush:hBitmap )
SetBrushOrgEx( hDC, nBmpWidth( ::oBrush:hBitmap ) - ::nLeft, nBmpHeight( ::oBrush:hBitmap ) - ::nTop )
FillRect( hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
else // This condition is added by RAMESH BABU P on Nov. 06, 2006
if Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO;TGROUP"
//DrawPBack( ::hWnd, hDC ) // chidiak remove this line
ParentImage( ::hWnd, hDC ) // chidiak fwh 11.04 may 08 2011
if Upper( ::ClassName() ) != "TGROUP"
// SendMessage( ::oWnd:hWnd, WM_ERASEBKGND, hDC, 0 ) // to properly remove/set the dotted rect // chidiak remove this line !!!!!!
endif
endif
endif
endif
else
if IsAppThemed() .and. Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO;TGROUP"
ParentImage( ::hWnd, hDC ) // chidiak
// DrawPBack( ::hWnd, hDC ) // chidiak remove this line
endif
endif
return ::oBrush:hBrush
Re: Problems with Checkbox
This modifies has made from Linares from many mounth ago
but I saw it was never modfied on the fwh relase and the problem persisted.... as mant others problems corrected but not saved
I sad I found the solution on control.prg ( if you read my message at the top of this topic).
but I saw it was never modfied on the fwh relase and the problem persisted.... as mant others problems corrected but not saved
I sad I found the solution on control.prg ( if you read my message at the top of this topic).
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Problems with Checkbox
Silvio
The control.prg published in this forum by Antonio several months ago is exactly the same in fwh 11.04 , and the problem is still there
In Maurizio's image , Checkbox is ok but not radios...
Richard
The control.prg published in this forum by Antonio several months ago is exactly the same in fwh 11.04 , and the problem is still there
In Maurizio's image , Checkbox is ok but not radios...
Richard
Re: Problems with Checkbox
I trying with radio now because I had problem this summer
with radio control but Now Not remember how I resolved it
I'm searching on my cds backup
with radio control but Now Not remember how I resolved it
I'm searching on my cds backup
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
Re: Problems with Checkbox
here run ok now
please try to rem this line
if IsAppThemed() .and. Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO;TGROUP"
// ParentImage( ::hWnd, hDC ) // chidiak
// DrawPBack( ::hWnd, hDC ) // chidiak remove this line
endif
endif
return ::oBrush:hBrush
I tried this test
please try to rem this line
if IsAppThemed() .and. Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO;TGROUP"
// ParentImage( ::hWnd, hDC ) // chidiak
// DrawPBack( ::hWnd, hDC ) // chidiak remove this line
endif
endif
return ::oBrush:hBrush
I tried this test
Code: Select all
#include"fivewin.ch"
FUNCTION TEST()
LOCAL oDlg,oFont,aGet[14],oFld
Local nRutipo:=4 , nRUPAG:=2
LOCAL cRUACT :=.f.
LOCAL cRUACT2 :=.f.
LOCAL cRUACT3 :=.f.
DEFINE FONT oFont NAME "MS Sans Serif" SIZE 0, 8
DEFINE DIALOG oDlg FROM 100, 100 TO 510,608;
TITLE "TEST" PIXEL FONT oFont
@ 10, 50 RADIO aGet[1] VAR nRutipo PROMPT "&Utente registrato" PIXEL SIZE 50, 12 OF oDlg
@ 10, 104 RADIOITEM "Elenco email" RADIOMENU aGet[1] PIXEL SIZE 50, 12 OF oDlg
@ 10, 155 RADIOITEM "&Amico personale" RADIOMENU aGet[1] PIXEL SIZE 50, 12 OF oDlg
@ 10, 210 RADIOITEM "Altro" RADIOMENU aGet[1] PIXEL SIZE 40, 12 OF oDlg
aGet[1]:aItems[ nRutipo ]:Check()
@ 90, 142 SAY "Act.:" OF oDlg SIZE 27, 8 PIXEL FONT oFont
@ 89, 154 CHECKBOX aGet[12] VAR cRUACT PROMPT "" OF oDlg SIZE 10, 10 PIXEL FONT oFont UPDATE
@ 111, 154 CHECKBOX aGet[13] VAR cRUACT2 PROMPT "" OF oDlg SIZE 10, 10 PIXEL FONT oFont UPDATE
@ 121, 154 CHECKBOX aGet[14] VAR cRUACT3 PROMPT "" OF oDlg SIZE 10, 10 PIXEL FONT oFont UPDATE
ACTIVATE DIALOG oDlg
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problems with Checkbox
Richard, please test it under all the conditions (transparent or not, themed or not, with background color, with background brush, with background gradient, ...).Richard Chidiak wrote:I had a solution modifying control prg , here it is, please report back if it fixes the problem
EMG
Re: Problems with Checkbox
Richard,
I use Windows XP .
I modify control.prg .
I try with BRUSH and without , with TRANSPARENT and without , but the problem persists .
The only workaround is :
function IsAppThemed()
return .F.
but is not the solution (there are a lot of messages in this forum )
Maurizio
I use Windows XP .
I modify control.prg .
I try with BRUSH and without , with TRANSPARENT and without , but the problem persists .
The only workaround is :
function IsAppThemed()
return .F.
but is not the solution (there are a lot of messages in this forum )
Maurizio
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Problems with Checkbox
Maurizio
One solution you may consider , this is something we did with some of our customers having this problem under xp, is to change the actual theme to windows classic for example, validate and then go back to the theme you had before.
This has been successful in many cases for us (not all ).
As per control.prg , i just tested with the change on xp , i have things working correctly. Of course we need much more tests as Enrico said , it is a complex situation , with themes, without, brushes etc...
I tested as much as i could under win7 64 bits, win xp , the results seem OK for me. But this needs definitely to be confirmed by as many people as possible here in this forum. For example, i don't use bakground brushes in my application , still needs to be tested.
Maybe someone else can test ? It will be really appreciated.
We need to get rid of these ennoying problems introduced with "transparency" , i am refering to checkbox, radios, fixed says ... we need to solve this once for all ,
My 2 cents,
Richard
One solution you may consider , this is something we did with some of our customers having this problem under xp, is to change the actual theme to windows classic for example, validate and then go back to the theme you had before.
This has been successful in many cases for us (not all ).
As per control.prg , i just tested with the change on xp , i have things working correctly. Of course we need much more tests as Enrico said , it is a complex situation , with themes, without, brushes etc...
I tested as much as i could under win7 64 bits, win xp , the results seem OK for me. But this needs definitely to be confirmed by as many people as possible here in this forum. For example, i don't use bakground brushes in my application , still needs to be tested.
Maybe someone else can test ? It will be really appreciated.
We need to get rid of these ennoying problems introduced with "transparency" , i am refering to checkbox, radios, fixed says ... we need to solve this once for all ,
My 2 cents,
Richard
Re: Problems with Checkbox
Richard,
your modified control.prg is working perfectly for me, thank you very much
your modified control.prg is working perfectly for me, thank you very much
Last edited by frose on Mon May 09, 2011 1:43 pm, edited 1 time in total.
Re: Problems with Checkbox
Maurizio,Maurizio wrote:Richard,
I use Windows XP .
I modify control.prg .
I try with BRUSH and without , with TRANSPARENT and without , but the problem persists .
The only workaround is :
function IsAppThemed()
return .F.
but is not the solution (there are a lot of messages in this forum )
Maurizio
Quizás así:
http://forums.fivetechsupport.com/viewt ... =6&t=20867
Un Saludo
Carlos G.
FiveWin 19.06 + Harbour 3.2, BCC 7 Windows 10
Carlos G.
FiveWin 19.06 + Harbour 3.2, BCC 7 Windows 10
Re: Problems with Checkbox
FiveWidi,
I don't have this line in my RC file
1 24 "c:\Windows\WindowsShell.Manifest"
My resources are in a DLL ( Pelles) and this is my RC file for Manifest e Icon
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
1 MANIFEST "MANIFEST.XML"
ICO ICON "ALBE.ICO
Regards Murizio
I don't have this line in my RC file
1 24 "c:\Windows\WindowsShell.Manifest"
My resources are in a DLL ( Pelles) and this is my RC file for Manifest e Icon
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
1 MANIFEST "MANIFEST.XML"
ICO ICON "ALBE.ICO
Regards Murizio
Re: Problems with Checkbox
FRIENDS ,
I HAVE 64 bit windows seven HOME Premium and here checkbox and radio controls run perfectly ,
only i must change tcontrol.prg ( see my message before at the top)
I not use isapptheme function ->nil
I use only xp windows effect resource as you can found at winxp folder on fwh/sample
no gradient
with gradient
I HAVE 64 bit windows seven HOME Premium and here checkbox and radio controls run perfectly ,
only i must change tcontrol.prg ( see my message before at the top)
I not use isapptheme function ->nil
I use only xp windows effect resource as you can found at winxp folder on fwh/sample
no gradient
with gradient
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problems with Checkbox
Richard, the first thing we have to know is what DrawPBack() is for. Antonio (or anybody else)?Richard Chidiak wrote:Code: Select all
//DrawPBack( ::hWnd, hDC ) // chidiak remove this line
EMG
Re: Problems with Checkbox
No Emg,
On Old Post on spanish forum Antonio Linares remmed this line !!!
this last year...
and there is another topic on forum
Remember ?
http://forums.fivetechsupport.com/viewt ... =DrawPBack
On Old Post on spanish forum Antonio Linares remmed this line !!!
this last year...
and there is another topic on forum
Remember ?
http://forums.fivetechsupport.com/viewt ... =DrawPBack
Best Regards, Saludos
Falconi Silvio
Falconi Silvio