oGet:bPainted:= {| hDC | DrawBox( 0, 0, oGet:nHeight, oGet:nWidth, hDC, 0, 0, 1, CLR_RED ) }
FUNCTION DrawBox( hDC, aRect, nAdj )
local aPoints
DEFAULT nAdj := 0
aPoints := { { aRect[ 2 ], aRect[ 1 ] },; //start
{ aRect[ 4 ], aRect[ 1 ] },; //top
{ aRect[ 4 ], aRect[ 3 ] },; //right
{ aRect[ 2 ], aRect[ 3 ] },; //Bottom
{ aRect[ 2 ], aRect[ 1 ] - nAdj } } //left
PolyLine( hDC, aPoints )
return nil
oGet2:bPainted:= {| hDC | DrawBox( hDC, { 0, 0, oGet2:nHeight, oGet2:nWidth } ) }
cmsoft wrote:Es muy interesante la funcionalidad que queres hacer.
En la clase TGraph hay metodos que te pueden ser de utilidad
nageswaragunupudi wrote:Why are you looking in tcalex.prg and tgraph.prg for drawing boxes?
TWindow class has a method Box and is available for every dialog and control too.
nageswaragunupudi wrote:oWnd/oDlg/oCtrl:Box( nTop, nLeft, nBottom, nRight, uBorder, uBrush, aText )
uBorder can be Color constant, or oPen or hPen.
#include 'fivewin.ch'
Function Main()
Local oDlg
Local oGet1
Local cVar1 := Space( 100 )
Local oGet2
Local cVar2 := Space( 100 )
DEFINE DIALOG oDlg Resource "Dialogo2"
Redefine Get oGet1 Var cVar1 Id 4004 Of oDlg
Redefine Get oGet2 Var cVar2 Id 4001 Of oDlg
oGet2:Box( 0, 0, oGet2:nHeight, oGet2:nWidth, CLR_RED )
ACTIVATE DIALOG oDlg CENTER
Return ( Nil )
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 10.00".
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
DIALOGO2 DIALOG DISCARDABLE 14, 40, 330, 36
STYLE WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|WS_THICKFRAME|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_VISIBLE
EXSTYLE WS_EX_TRANSPARENT|WS_EX_CONTEXTHELP
CAPTION "Dialogo"
FONT 10, "Segoe UI Light"
{
CONTROL "Edit", 4004, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 8, 4, 316, 12
CONTROL "Edit", 4001, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 8, 20, 316, 12
}
#Include 'FiveWin.Ch'
#Define CLR_PINK RGB( 255, 128, 128)
FUNCTION Main()
Local oDlg, cTitle
Local oGet1
Local cVar1 := Space( 100 )
Local oGet2
Local cVar2 := Space( 100 )
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
REDEFINE GET oGet2 VAR cVar2 ID 4001 OF oDlg
ACTIVATE DIALOG oDlg CENTER ;
ON PAINT( oGet2:Box( -1, -1, oGet2:nHeight, oGet2:nWidth, CLR_HRED ) )
RETURN NIL
karinha wrote:Cual és la FONT?
-1 -1, funciona perfecto con WorkShop.exe y el GET sin Border.
Saludos.
::oFont := TFont():New ( 'Segoe UI', 0, -12,,,,,,,,,,,,,,,.f. )
jgabri wrote:Hola
Puedes publicar el código, de cómo lo estás haciendo ?
Un saludo y gracias
oGet:oWnd:Box ( oGet:nTop - 1,;
oGet:nLeft - 1,;
oGet:nTop + oGet:nHeight ,;
oGet:nLeft + oGet:nWidth ,;
{ HexToRgb ( '#d4edda' ), 1 } )
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 28 guests