and this is the result
only i have problem with vertical scroll because when i click on the vscroll it move also the messagebar or the buttonbar
any solution ?
the sources of the test
- Code: Select all Expand view
- #include "FiveWin.ch"
#include "richedit.ch"
static oWnd, oRtf, cRtf, oEdit, cVar
#define COLOR_BTNFACE 15
function main()
local o
local hDll := LoadLibrary( "Riched20.dll" )
define window oWnd menu oMenu() ;
color CLR_HGRAY,CLR_HGRAY ;
VSCROLL ;
TITLE "TEST RTF PAGE"
cRtf := memoread("testrtf.rtf")
@ 10, 20 RICHEDIT oRtf VAR cRtf of oWnd NO SCROLL NOBORDER
DEFINE BUTTONBAR oBar OFoWnd SIZE 30,33 3DLOOK 2007
SET MESSAGE OF oWnd TO "Class TRichEdit" DATE TIME ;
COLOR CLR_HBLUE, GetSysColor( COLOR_BTNFACE )
activate window oWnd ;
on init (adjustRtf(), TScrWnd():New( oWnd,1,35,1,30) ) ;
on resize adjustRtf() ;
maximized
freeLibrary(hDll)
return nil
//----------------------------------------------------------------------
function adjustRtf()
local nTop, nLeft, nHorRes, aRect, nHeight, nWidth
nTop := 100
nLeft := 100
nHorRes := GetSysMetrics( 0 )
aRect := GetClientRect(oWnd:hWnd)
nHeight := aRect[4] - 289
nWidth := aRect[4] - aRect[2] - 202
oRtf:move(nTop, nLeft, nWidth, nHeight , .t. )
return nil
//----------------------------------------------------------------------
function oMenu()
LOCAL oMenu
MENU oMenu 2007
MENUITEM "&File "
MENU
MENUITEM "E&xit" ACTION oWnd:end()
ENDMENU
ENDMENU
RETURN oMenu