I make some test how show a rtf control as Winword page or Openoffice on the middle of a owndmain
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
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
#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 oMenuSince from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com