//----------------------------------------------------------------------------//
METHOD Paint() CLASS TGet
local aInfo := ::DispBegin()
local hOldFont
if ::oBrush != nil
FillRect( ::hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
else
CallWindowProc( ::nOldProc, ::hWnd, WM_ERASEBKGND, ::hDC, 0 )
endif
if IsWindowEnabled( ::hWnd )
CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 )
else
***===>>>>>>>>>>> ESTAS LINEAS DEL IF FUERON ANULADAS PARA PONER COLOR A TODOS LOS GETS EN DISABLE
*if ::lDisColors
* SetTextColor( ::hDC, GetSysColor( COLOR_GRAYTEXT ) )
* SetBkColor( ::hDC, GetSysColor( COLOR_WINDOW ) )
*else
** Cambio de Colores cuando el Get esta deshablitidado (lubin)
SetTextColor( ::hDC,RGB(128,0,0) ) && SetTextColor( ::hDC, ::nClrText )
SetBkColor( ::hDC, RGB(234,238,242) ) && SetBkColor( ::hDC, ::nClrPane )
*endif
if ::oFont != nil
hOldFont = SelectObject( ::hDC, ::oFont:hFont )
endif
do case
case lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_CENTER )
SetTextAlign( ::hDC, TA_CENTER )
if ::lSpinner
ExtTextOut( ::hDC, 1, ( ::nWidth() - 3 - GetSysMetrics( SM_CYHSCROLL ) ) / 2,;
{ 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )
else
ExtTextOut( ::hDC, 1, ( ::nWidth() - 3 ) / 2,;
{ 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )
endif
case lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_RIGHT )
SetTextAlign( ::hDC, TA_RIGHT )
if ::lSpinner
ExtTextOut( ::hDC, 1, ::nWidth() - 7 - GetSysMetrics( SM_CYHSCROLL ),;
{ 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )
else
ExtTextOut( ::hDC, 1, ::nWidth() - 7,;
{ 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )
endif
otherwise
SetTextAlign( ::hDC, TA_LEFT )
ExtTextOut( ::hDC, 1, 2,;
{ 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )
endcase
if ::oFont != nil
SelectObject( ::hDC, hOldFont )
endif
endif
if ValType( ::bPainted ) == "B"
Eval( ::bPainted, ::hDC, ::cPS, Self )
endif
::DispEnd( aInfo )
return 1