Code: Select all
**--[ Inicio de folders ]--**
REDEFINE FOLDER oFld ID 2501 OF oDlg PROMPTS "Exame Clínico","Exame Ginecológico", "Expecular","Toque","Diagnóstico","Exames Solicitados","Conduta e Tratamento" ;
DIALOGS "CONSULTA_ATENDIMENTO_FLD1", ;
"CONSULTA_ATENDIMENTO_FLD2", ;
"CONSULTA_ATENDIMENTO_FLD3", ;
"CONSULTA_ATENDIMENTO_FLD4", ;
"CONSULTA_ATENDIMENTO_FLD5", ;
"CONSULTA_ATENDIMENTO_FLD6", ;
"CONSULTA_ATENDIMENTO_FLD7" COLOR PRETO,CINZACC
oFld:aDialogs[1]:bPainted:={|| PintaTela(oFld:aDialogs[1],CINZACC,CINZACC)}
oFld:aDialogs[2]:bPainted:={|| PintaTela(oFld:aDialogs[2],CINZACC,CINZACC)}
oFld:aDialogs[3]:bPainted:={|| PintaTela(oFld:aDialogs[3],CINZACC,CINZACC)}
oFld:aDialogs[4]:bPainted:={|| PintaTela(oFld:aDialogs[4],CINZACC,CINZACC)}
oFld:aDialogs[5]:bPainted:={|| PintaTela(oFld:aDialogs[5],CINZACC,CINZACC)}
oFld:aDialogs[6]:bPainted:={|| PintaTela(oFld:aDialogs[6],CINZACC,CINZACC)}
oFld:aDialogs[7]:bPainted:={|| PintaTela(oFld:aDialogs[7],CINZACC,CINZACC)}
Code: Select all
**-----------------------------------------------------------------------------------------------------------**
** Pintar o fundo de uma tela( Dlg,Folder,Wnd) **
**-----------------------------------------------------------------------------------------------------------**
** Parametros : oDlg : Onde vai pintar **
** : Cor1 : Cor incial na parte de cima da tela **
** : Cor2 : Cor Final na parte de baixo da tela **
** Exemplo : oDlg[1]:bPainted:={|| PintaTela(oDlg[1],GetSysColor(15),GetSysColor(16) )} **
**-----------------------------------------------------------------------------------------------------------**
FUNCTION PintaTela(oDlgTxt,aCor1,aCor2)
#include "fivewin.ch"
LOCAL hWnd:=oDlgTxt:hWnd
LOCAL aRec:=GetClientRect(hWnd)
LOCAL oBrush,nX,nStp:=(aRec[3]-aRec[1])/2
LOCAL nColor1:=IF(Empty(aCor1),GetSysColor(15),aCor1)
LOCAL nColor2:=IF(Empty(aCor2),GetSysColor(15),aCor2)
LOCAL nColorR1:=nRgbRed(nColor1),nColorG1:=nRgbGreen(nColor1),nColorB1:=nRgbBlue(nColor1)
LOCAL nColorR2:=nRgbRed(nColor2),nColorG2:=nRgbGreen(nColor2),nColorB2:=nRgbBlue(nColor2)
LOCAL nSomaR:=ABS(nColorR2-nColorR1),nSomaG:=ABS(nColorG2-nColorG1),nSomaB:=ABS(nColorB2-nColorB1)
nSomaR:=IIF(nSomaR<0,0,(nSomaR/((aRec[3])/2)))
nSomaG:=IIF(nSomaG<0,0,(nSomaG/((aRec[3])/2)))
nSomaB:=IIF(nSomaB<0,0,(nSomaB/((aRec[3])/2)))
oDlgTxt:GetDC()
aRec[3]:=0
FOR nX:=1 TO nStp
aRec[3]+=2
DEFINE BRUSH oBrush COLOR nRgb(nColorR1,nColorG1,nColorB1)
FillRect(oDlgTxt:hDC,aRec,oBrush:hBrush)
RELEASE BRUSH oBrush
aRec[1]+=2
nColorR1:=IIF(nColorR2>=nColorR1,nColorR1+nSomaR,nColorR1-nSomaR)
nColorG1:=IIF(nColorG2>=nColorG1,nColorG1+nSomaG,nColorG1-nSomaG)
nColorB1:=IIF(nColorB2>=nColorB1,nColorB1+nSomaB,nColorB1-nSomaB)
NEXT
oDlgTxt:ReleaseDC()
RETURN(NIL)
**-----------------------------------------------------------------------------------------------------------**