- Code: Select all Expand view RUN
local oDlg, oSay
define dialog oDlg size 200,30
@ 0,0 say oSay prompt "" right size 100,10 pixel color "r/w"
activate dialog oDlg on init oSay:setText( "Hola mundo" )
return nil
Solución: Quita la línea 261
local oDlg, oSay
define dialog oDlg size 200,30
@ 0,0 say oSay prompt "" right size 100,10 pixel color "r/w"
activate dialog oDlg on init oSay:setText( "Hola mundo" )
return nil
if ! lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), SS_RIGHT )
::nWidth := GetTextWidth( 0, ::cCaption, If( ::oFont != nil, ::oFont:hFont,) )
endif
#include "FiveWin.ch"
function main
local oDlg, oSay
define dialog oDlg size 200,30
@ 0,0 say oSay prompt "" center size 100,10 pixel color "r/w"
activate dialog oDlg on init oSay:setText( "Hola mundo" )
return nil
METHOD SetText( cText ) CLASS TSay
#define GWL_STYLE -16
#define SS_RIGHT 2
local hDC
DEFAULT ::lTransparent := .f.
::cCaption := If( ::cPicture != nil, Transform( cText, ::cPicture ),;
cValToChar( cText ) )
#ifndef __CLIPPER__
if ::oWnd:oBrush != nil .and. Empty( ::oWnd:oBrush:hBitmap ) .and. ( IsAppThemed() .or. ::lTransparent )
DrawPBack( ::hWnd, hDC := GetDC( ::hWnd ) )
ReleaseDC( ::hWnd, hDC )
endif
#endif
// ::nWidth := GetTextWidth( 0, ::cCaption, If( ::oFont != nil, ::oFont:hFont,) )
if ! lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), SS_RIGHT )
::nWidth := GetTextWidth( 0, ::cCaption, If( ::oFont != nil, ::oFont:hFont,) )
endif
SetWindowText( ::hWnd, ::cCaption )
return nil
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 17 guests