With fw 11.04
I insert METHOD HandleEvent() INLINE NIL in checkbox.prg
but the problem persist in radio.
![Image](http://img851.imageshack.us/img851/5287/checkbox.th.jpg)
Uploaded with ImageShack.us
Regards MAurizio
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
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
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
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
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