#include "FiveWin.ch"
function Main()
local cTitle := "Test Rich Edit Function"
local cText := "this is a test line of the rich edit function. It should be editable very easily"
RichEdit( @cText, cTitle )
MsgInfo( cText )
return nil
function RichEdit( cText, cTitle, nTop, nLeft, nBottom, nRight )
local oFont, oDlg, oMemo
local hDLL
local uTemp := If( ! Empty( cText ), cText, '' )
local lRich := .F., lGTF := .F., lSaved := .F.
DEFAULT nTop := 9, nLeft := 9, nBottom := 27, nRight := 71.5,;
cTitle := "RichEdit"
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -10
DEFINE DIALOG oDlg FROM nTop, nLeft TO nBottom, nRight ;
TITLE cTitle FONT oFont
oDlg:lTruePixel := .f.
hDLL = LoadLibrary( 'riched20.dll' )
@ 30, 3 RICHEDIT oMemo VAR uTemp OF oDlg PIXEL SIZE 200, 200
oDlg:oClient = oMemo
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( BuildRichEditBar( oDlg, oMemo,;
{ | c | lSaved := .T., cText := c } ), oDlg:ReSize() )
oFont:End()
if hDLL != nil
FreeLibrary( hDLL )
endif
return lSaved
#include "FiveWin.ch"
function Main()
local cTitle := "Test Rich Edit Function"
local cText := "this is a test line of the rich edit function. It should be editable very easily"
while RichEdit( @cText, cTitle )
MsgInfo( cText )
end
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 69 guests