// C:\FWH\SAMPLES\GIOVANY3.PRG
#include "FiveWin.ch"
FUNCTION Main()
LOCAL oDlg, oFont, oFnt, aGrad, oImprimir, oSaida, aGet := ARRAY(5)
LOCAL dDateHoy, IDCOR
LOCAL cQuemAssina := [GIOVANNY VECCHI DE ALMEIDA JUNIOR FILHO UNICO]
SET CENTURY ON
SET DATE BRITISH
SET EPOCH TO YEAR( DATE() ) - 30
SkinButtons()
dDateHoy := DTOC( DATE() )
aGrad := { { 0.30, CLR_HCYAN, CLR_HCYAN },{ 0.50, CLR_HCYAN, CLR_HCYAN } }
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 00, -12 BOLD
DEFINE DIALOG oDlg RESOURCE "FIND_CONTROL" GRADIENT aGrad
oDlg:lHelpIcon := .F.
For IDCor = 4001 To 4002 // Os ID's dos TEXTOS na DIALOG.
REDEFINE SAY ID IDCor COLOR CLR_HBLUE, CLR_WHITE OF oDlg ;
UPDATE FONT oFnt TRANSPARENT
Next IDCor
REDEFINE GET aGet[1] VAR dDateHoy ID 331 OF oDlg ;
PICTURE "@D 99/99/9999" UPDATE COLORS CLR_BLACK, CLR_WHITE FONT oFnt
REDEFINE GET aGet[2] VAR cQuemAssina ID 332 OF oDlg ;
PICTURE "@K!" UPDATE COLORS CLR_BLACK, CLR_WHITE FONT oFnt
REDEFINE BUTTON oImprimir ID 301 OF oDlg ;
ACTION ( NIL )
oImprimir:cTooltip :={ "Click no Botão Para Imprimir", ;
"Imprimir Dados da Proposta ", 1, CLR_WHITE, CLR_HBLUE }
REDEFINE BUTTON oSaida ID 302 OF oDlg ACTION ( oDlg:End() ) CANCEL
oSaida:cTooltip :={ "Click no Botão Para Sair", ;
"Saida - Exit - Cancelar ", 1, CLR_WHITE, CLR_HBLUE }
SET FONT OF oImprimir TO oFont
SET FONT OF oSaida TO oFont
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT( G_CTRLS_COLORS_API( oDlg ) ) // nao entendi nada aqui.
oFont:End()
oFnt:End()
RETURN NIL
FUNCTION G_CTRLS_COLORS_API( f_oDlgContainer )
LOCAL lc_aCtrlsAllFwh := {}
LOCAL lc_aIDsAllFwh := {}
LOCAL lc_aCtrlsAllApi := {}
LOCAL lc_aIDsSayFwh := {}
LOCAL lc_iFor := 0
lc_aCtrlsAllFwh := f_oDlgContainer:aControls
FOR lc_iFor := 1 TO Len( lc_aCtrlsAllFwh )
IF ValType( lc_aCtrlsAllFwh[ lc_iFor ] ) == "O"
AAdd( lc_aIDsAllFwh, lc_aCtrlsAllFwh[ lc_iFor ]:nID )
ENDIF
NEXT
EnumChildWindows( f_oDlgContainer:hWnd, ;
{| _hChild | AAdd( lc_aCtrlsAllApi, { GetClassName( _hChild ), GetDlgCtrlID( _hChild ), _hChild, } ) } )
FOR lc_iFor := 1 TO Len( lc_aCtrlsAllApi )
IF Upper( lc_aCtrlsAllApi[ lc_iFor, 1 ] ) == "STATIC"
#ifdef __XHARBOUR__
IF AScan( lc_aIDsAllFwh, lc_aCtrlsAllApi[ lc_iFor, 2 ] ) == 0 ; // Static Api > SAY Fwh not declared
.AND. lc_aCtrlsAllApi[ lc_iFor, 2 ] != 65535 // Static borland or IDs null
#Else
IF hb_AScan( lc_aIDsAllFwh, lc_aCtrlsAllApi[ lc_iFor, 2 ] ) == 0 ; // Static Api > SAY Fwh not declared
.AND. lc_aCtrlsAllApi[ lc_iFor, 2 ] != 65535 // Static borland or IDs null
#endif
SetWindowTheme( GetDc( lc_aCtrlsAllApi[ lc_iFor, 3 ] ), "", "" )
Ctl3DLook( GetDc( lc_aCtrlsAllApi[ lc_iFor, 3 ] ), .F. )
// sem efeito
SetTextColor( GetDc( lc_aCtrlsAllApi[ lc_iFor, 3 ] ), CLR_YELLOW )
// sem efeito
SetBkColor( GetDc( lc_aCtrlsAllApi[ lc_iFor, 3 ] ), CLR_HCYAN )
ENDIF
ENDIF
NEXT
RETURN NIL
// FIN / END
/* // GIOVANY3.RC
FIND_CONTROL DIALOGEX DISCARDABLE 6, 18, 325, 96
STYLE WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Dialog: Find Controls?"
FONT 10, "Tahoma"
{
CONTROL "Edit", 331, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 74, 40, 44, 12
CONTROL "Edit", 332, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 74, 54, 243, 12
CONTROL "&Imprimir", 301, "Button", WS_TABSTOP, 162, 72, 76, 17
CONTROL "&Saida", 302, "Button", WS_TABSTOP, 241, 72, 76, 17
CONTROL "Data da Intimação:", 4001, "Static", SS_RIGHT|WS_GROUP, 6, 42, 67, 8
CONTROL "Quem assina/Cargo:", 4002, "Static", SS_RIGHT|WS_GROUP, 1, 56, 72, 8
}
*/