#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL cVar := SPACE( 30 )
DEFINE DIALOG oDlg
@ 1, 1 GET cVar
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
// viewtopic.php?f=6&t=39889
#Include 'FiveWin.Ch'
#Define CLR_PINK RGB( 255, 128, 128)
FUNCTION Main()
Local oDlg, cTitle
Local oGet1
Local cVar1 := Space( 30 )
Local oGet2
Local cVar2 := Space( 30 )
Local oGet3
Local cVar3 := Space( 30 )
cTitle := OemToAnsi( "FIVEWIN: GET CON BORDES RED COLOR Y PAINT" )
DEFINE DIALOG oDlg Resource "DIALOGO2" TITLE cTitle ;
COLORS CLR_BLACK, CLR_WHITE TRANSPARENT
oDlg: lHelpIcon := .F.
REDEFINE GET oGet1 VAR cVar1 ID 4004 OF oDlg
oDlg:bPainted := {|| SetGetRounded( oGet1[4004], oDlg) }
REDEFINE GET oGet2 VAR cVar2 ID 4001 OF oDlg
oDlg:bPainted := {|| SetGetRounded( oGet2[4001], oDlg) }
ACTIVATE DIALOG oDlg CENTER ;
ON PAINT( oGet2:Box( -1, -1, oGet2:nHeight, oGet2:nWidth, CLR_HRED ) )
RETURN NIL
//-> Funcao que arredonda o as bordas do get
function SetGetRounded( oControl, oDlg )
local hBrush, hOldBrush
if "TGET" $ oControl:ClassName()
hBrush := CreateSolidBrush( RGB( 255, 255, 255 ) )
hOldBrush := SelectObject( oDlg:hDC, hBrush )
RoundRect( oDlg:hDC, oControl:nLeft - 3 ,;
oControl:nTop - 2 ,;
oControl:nLeft + oControl:nWidth + 3,;
oControl:nTop + oControl:nHeight + 2,;
oControl:nHeight / 2 ,;
oControl:nWidth )
SelectObject( oDlg:hDC, hOldBrush )
DeleteObject( hBrush )
endif
return(.t.)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 46 guests