Adolfo wrote:Lucas.
Puedes Sobre-Escribir los metodos,, Tener un PRG exclusivo con los metodos nuevos y al que debes llamar antes de iniciar la ventana principal
En este caso el metodo RButtonDown( nRow, nCol, nFlags ) de tRichEdit y de mGet
OVERRIDE METHOD RbButtonDown IN CLASS TRichEdit WITH MiRButtonDown
En tu metodo MiRbuttonDown puedes escribir los menues en Español, o tener algo que identifique que lenguaje utilizar y tienes una solución.
Por lo que veo para que Fivetech solucione ese problema, debera tener un .CH con los mensajes en los distintos idiomas y llamarlos de acuerdo a un flag que le indique cual usar.
Espero que te sirva.
Desde Chile
Adolfo
Adolfo wrote:LUCAS...
Tal como te respondio Przemysław Czerpak en abril del 2011, la solucion esta en el \\harbour-3.0.0\doc\xhb-diff.txt
### RUNTIME CLASS MODIFICATION ###
========================================
Harbour and xHarbour use dynamic bindings so it's possible to modify class
definitions at runtime. To avoid possible very serious problems which can
be caused by such class modification Harbour provides LOCKED clause in class
definition. xHarbour does not have such functionality and even documented
command like OVERRIDE CLASS or EXTEND CLASS as official features though
they break inheritance scheme and never worked correctly in the whole
xHarbour history. They are available in Harbour only in xHarbour compatible
library after including xhbcls.ch for porting existing xHarbour code to
Harbour and work exactly like in xHarbour having the same problems so they
are not planned to be part of Harbour core code.
O sea Incluir xhbcls.ch en tu prg, y la libreria xdiff.lib y/o xhb.lib pero con las restricciones y posibles errores que puedes tener.
Luego utilizas el OVERRIDE
Carlos he ahi tambien la respuesta, no existe en HARBOUR pero puede usarse en modo compatibilidad.
Desde Chile
Adolfo
METHOD BuildWindow() CLASS TPreview
local oIcon, cTitle := "FiveWin Printing Preview", oCursor, oBar, nCol := 325
local oThis := Self
local nRow := 7
DEFAULT ::oWndMain := WndMain()
::hOldRes := GetResources()
if ! File( ::cResFile )
#ifdef __CLIPPER__
::cResFile := "Preview.dll"
#else
if ! IsWin64()
::cResFile := "Prev32.dll"
else
::cResFile = "Prev64.dll"
endif
#endif
endif
if SetResources( ::cResFile ) < 32
MsgStop( ::cResFile + " not found, imposible to continue",;
"FiveWin Printing Error" )
return nil
endif
::hNewRes := GetResources()
if ::oDevice != nil
cTitle = ::oDevice:cDocument
endif
if ::oWndMain != nil
oIcon = ::oWndMain:oIcon
else
DEFINE ICON oIcon RESOURCE "Print"
endif
DEFINE FONT ::oFont NAME GetSysFont() SIZE 0, -12
::CheckStyle()
if !::oDevice:lPrvModal .and. ::oWndMain != nil .and. ;
Upper( ::oWndMain:ClassName() ) == "TMDIFRAME"
DEFINE WINDOW ::oWnd ;
TITLE cTitle ;
COLOR CLR_BLACK,CLR_LIGHTGRAY ;
ICON oIcon ;
VSCROLL HSCROLL MDICHILD
else
DEFINE WINDOW ::oWnd /*FROM 0, 0 TO 24, 80*/ ;
TITLE cTitle ;
COLOR CLR_BLACK,CLR_LIGHTGRAY ;
ICON oIcon ;
VSCROLL HSCROLL MENU ::BuildMenu()
endif
::oWnd:SetFont( ::oFont )
::oWnd:oVScroll:SetRange( 0, 0 )
::oWnd:oHScroll:SetRange( 0, 0 )
::cPageNum = TXT_PAGENUM
::BuildButtonBar()
/*
#ifdef __CLIPPER__
SET MESSAGE OF ::oWnd TO TXT_PREVIEW CENTERED ;
NOINSET CLOCK DATE KEYBOARD
#else
if l2007
SET MESSAGE OF ::oWnd TO TXT_PREVIEW CENTERED ;
NOINSET CLOCK DATE KEYBOARD 2007
else
DEFINE STATUSBAR OF ::oWnd PROMPT " " + TXT_PREVIEW
endif
#endif
*/
if lRebar
DEFINE STATUSBAR OF ::oWnd PROMPT " " + TXT_PREVIEW
else
SET MESSAGE OF ::oWnd TO TXT_PREVIEW CENTERED ;
NOINSET CLOCK DATE KEYBOARD
::oWnd:oMsgBar:l2007 := ( nStyle == 2007 )
::oWnd:oMsgBar:l2010 := ( nStyle == 2010 )
endif
::oMeta1 := TMetaFile():New( 0, 0, 0, 0,;
::oDevice:aMeta[ 1 ],;
::oWnd,;
CLR_BLACK,;
CLR_WHITE,;
::oDevice:nHorzRes(),;
::oDevice:nVertRes() )
if ! IsWin64()
DEFINE CURSOR ::oCursor RESOURCE "LUPA"
else
DEFINE CURSOR ::oCursor RESOURCE "search"
endif
::oMeta1:oCursor := ::oCursor
::oMeta1:blDblClick := { | nRow, nCol, nKeyFlags | ;
::SetOrg1( nCol, nRow, nKeyFlags ) }
::oMeta1:bKeyDown := { | nKey, nFlags | ::CheckKey( nKey, nFlags ) }
::oMeta1:bMouseWheel := { | nKeys, nDelta, nXPos, nYPos | ;
::CheckMouseWheel( nKeys, nDelta, nXPos, nYPos ) }
#ifndef __XPP__ // XBPP bug. Warning: don't change this into #ifdef __CLIPPER__
::oMeta2 := TMetaFile():New( 0, 0, 0, 0, "",;
::oWnd, CLR_BLACK, CLR_WHITE, ::oDevice:nHorzRes(),;
::oDevice:nVertRes() )
#else
::oMeta2 := TMetaFile():New():_New( 0, 0, 0, 0, "",;
::oWnd, CLR_BLACK, CLR_WHITE, ::oDevice:nHorzRes(),;
::oDevice:nVertRes() )
#endif
::oMeta2:oCursor = ::oCursor
::oMeta2:blDblClick := { | nRow, nCol, nKeyFlags | ;
::SetOrg2( nCol, nRow, nKeyFlags ) }
::oMeta2:hide()
::SetFactor()
oBar := ::oBar
if !lRebar
nCol := ATail( oBar:aControls ):nRight + 30
nRow := Int( oBar:nHeight / 2 ) - 6
endif
if nStyle >= 2007
oBar:bPainted = { || oBar:Say( nRow, nCol, "Factor:",,, ::oFont, .T., .T. ),;
If( Len( ::oDevice:aMeta ) > 1,;
oBar:Say( nRow, nCol+100, ::cPageNum + LTrim( Str( ::nPage, 4, 0 ) ) + " / " + ;
LTrim( Str( Len( ::oDevice:aMeta ) ) ),,, ::oFont, .T., .T. ),;
oBar:Say( nRow, nCol+100, ::cPageNum + LTrim( Str( ::nPage, 4, 0 ) ),;
,,, ::oFont, .T., .T. ) ) }
endif
if nStyle < 2007
@ nRow, nCol SAY ::oSay PROMPT "Factor:" ;
SIZE 45, 15 PIXEL OF ::oBar FONT ::oFont
::oSay:lTransparent = .T.
endif
@ nRow-4, nCol+40 COMBOBOX ::oFactor VAR ::nZFactor ;
ITEMS { "1", "2", "3", "4", "5", "6", "7", "8", "9" } ;
OF ::oBar FONT ::oFont PIXEL SIZE 35,200 ;
ON CHANGE oThis:SetFactor( oThis:nZFactor )
if nStyle < 2007
if Len( ::oDevice:aMeta ) > 1
@ nRow, nCol+100 SAY ::oPage PROMPT TXT_PAGENUM + LTrim( Str( ::nPage, 4, 0 ) ) + " / " + ;
LTrim( Str( Len( ::oDevice:aMeta ) ) ) ;
SIZE 180, 15 PIXEL OF ::oBar FONT ::oFont
else
@ nRow, nCol + 100 SAY ::oPage PROMPT TXT_PAGENUM + LTrim( Str( ::nPage, 4, 0 ) ) ;
SIZE 180, 15 PIXEL OF ::oBar FONT ::oFont
endif
::oPage:lTransparent = .T.
endif
// if IsAppThemed() .or. l2007
if lRebar .or. nStyle >= 2007
FixSays( ::oBar:hWnd )
endif
#ifndef __XPP__
::oFactor:Set3dLook( .T. )
#endif
SetResources( ::hOldRes )
::oWnd:oHScroll:bPos := { | nPos | ::HScroll( GO_POS, .f., nPos ) }
::oWnd:oVScroll:bPos := { | nPos | ::VScroll( GO_POS, .f., nPos ) }
return nil
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: MGA and 42 guests