by karinha » Tue Jul 24, 2007 4:20 pm
- Code: Select all Expand view
// Sensitive Say control by Ramón Avendaño
// 23-02-00
//-> CLASSE SSAY.PRG
//----------------------------------------------------------------------------//
METHOD Paint() CLASS TSSay
local n
local nColorShadow, nColorLight
DEFAULT ::lTransparent := .f.
if ::nClrLight = Nil
nColorLight := GetSysColor( COLOR_BTNHIGHLIGHT )
else
nColorLight := ::nClrLight
endif
::GetDC()
if ::lActive
**INI-20/02/2005 - Linares - Só começa a valer apartir do fwh fevereiro 2006
if ::lTransparent .and. ! Empty( ::oBrush:hBitmap )
SetBrushOrgEx( ::hDC, nBmpWidth( ::oBrush:hBitmap ) - ::nLeft, nBmpHeight( ::oBrush:hBitmap ) - ::nTop )
FillRect( ::hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
endif
**FIM-20/02/2005 - Linares
for n := 1 to len( ::aCaption )
if ::lLight
WSay( ::hWnd, ::hDC, ::nSTop + ( n - 1 ) * ::nTxtHeight + 1, ::nSLeft + 1, ::aCaption[ n ],;
nColorLight,, If( ::oFont != nil, ::oFont:hFont, 0 ), .T., .T., ::nAlign )
endif
WSay( ::hWnd, ::hDC, ::nSTop + ( n - 1 ) * ::nTxtHeight, ::nSLeft, ::aCaption[ n ],;
If( ::lOver, ::nClrOver, ::nClrText ),,;
If( ::oFont != nil, ::oFont:hFont, 0 ), .T., .T., ::nAlign )
next
if ::lDrawBox
::DrawBox( ::lOver )
endif
else
nColorShadow := GetSysColor( COLOR_BTNSHADOW )
nColorLight := GetSysColor( COLOR_BTNHIGHLIGHT )
for n := 1 to len( ::aCaption )
WSay( ::hWnd, ::hDC, ::nSTop + ( n - 1 ) * ::nTxtHeight + 1, ::nSLeft + 1, ::aCaption[ n ], nColorLight,,;
If( ::oFont != nil, ::oFont:hFont, 0 ), .T., .T., ::nAlign )
WSay( ::hWnd, ::hDC, ::nSTop + ( n - 1 ) * ::nTxtHeight, ::nSLeft, ::aCaption[ n ], nColorShadow,,;
If( ::oFont != nil, ::oFont:hFont, 0 ), .T., .T., ::nAlign )
next
endif
// 3D
if ::lShaded
WndInset( ::hWnd, ::hDC ) // SHADED, SHADOW
endif
if ::lRaised
WndRaised( ::hWnd, ::hDC ) // RAISED
endif
if ::lBox
WndBoxIn( ::hDC, 0, 0, ::nBottom-::nTop, ::nRight-::nLeft )
WndBoxRaised( ::hDC, 1, 1, ::nBottom-::nTop-1, ::nRight-::nLeft-1 )
endif
::ReleaseDC()
if ::lTransparent
SysRefresh()
endif
return nil
//-> Maestro Antonio... No tienes un erro aca?? Pues, Traba el DIALOGO en un
//-> FOLDER con mas de 50 SAYS... Que puede seer?
//-> Esto ocorre solo en Windows XP, en Windows 98, Funciona Normal.
Muchas gracias.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341