// C:\FWH..\SAMPLES\JIMMYRAD.PRG
#include "FiveWin.ch"
#define CLR_PretoDark RGB( 0, 0, 0 ) // black
#define CLR_SombrioDark RGB( 29, 29, 29 )
#define CLR_CinzaDark+ RGB( 34, 34, 34 )
#define CLR_Cinza_Dark RGB( 51, 51, 51 )
#define CLR_CinzentoDark RGB( 85, 85, 85 )
#define CLR_CinzaWhite RGB( 153, 153, 153 )
#define CLR_IsqueiroDark RGB( 238, 238, 238 )
#define CLR_BrancoWhite RGB( 255, 255, 255 )
STATIC oWnd
FUNCTION Main()
LOCAL oBar
SkinButtons()
DEFINE WINDOW oWnd MDI
DEFINE BUTTONBAR oBar OF oWnd _3D
DEFINE BUTTON OF oBar NOBORDER ;
FILENAME "..\bitmaps\16x16\Help.bmp" ;
ACTION BuildChild()
ACTIVATE WINDOW oWnd CENTERED ;
ON INIT( SetWindowTheme( oWnd:hWnd, "", "" ) )
RETURN NIL
FUNCTION BuildChild()
LOCAL oWndChild, nValue := 3, oRad
SET _3DLOOK ON
DEFINE WINDOW oWndChild MDICHILD ;
TITLE "Testing a Radio Buttons Menu" COLOR "N/W"
@ 1, 5 BUTTON "&Test" SIZE 70, 20 ACTION MsgInfo( nValue )
@ 3, 2 RADIO oRad VAR nValue _3D SIZE 150, 25 ;
ITEMS "Button", "CheckBox", "Group", "Bitmaps", "ComboBox", "Dialog", ;
"Get", "Icon", "ListBox", "MdiChild", "MdiFrame", "Meter", ;
"MGet", "Radio", "Say", "Scrollbar","Video", "WBrowse", "Window" ;
COLOR CLR_HRED, CLR_SombrioDark ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()
ACTIVATE WINDOW oWndChild ;
ON INIT( CTRLS_COLORS( oWndChild ) )
RETURN NIL
// By Giovanny Vecchi - TESTRAD.PRG aqui na minha pasta.
FUNCTION CTRLS_COLORS( f_oDlgContainer )
LOCAL lc_aCtrls := {}, lc_iFor := 0
LOCAL lc_aItemsRadio := {}
lc_aCtrls := f_oDlgContainer:aControls
FOR lc_iFor := 1 TO Len( lc_aCtrls )
IF ValType( lc_aCtrls[lc_iFor] ) == "O"
IF lc_aCtrls[lc_iFor]:ClassName() == "TRADIO"
aEval( lc_aCtrls[lc_iFor]:oRadMenu:aItems, ;
{|_oRadId|{ SetWindowTheme( _oRadId:hWnd, "", "" ), ;
_oRadId:SetColor( CLR_HRED, CLR_PretoDark ) } } )
ELSEIF lc_aCtrls[lc_iFor]:ClassName() == "TCHECKBOX"
// SetWindowTheme( lc_aCtrls[lc_iFor]:hWnd, "", "" )
// lc_aCtrls[lc_iFor]:SetColor( G_COLOR_SYS( 31 ), G_COLOR_SYS( 1 ) )
ENDIF
ENDIF
NEXT
RETURN NIL
// FIN / END