richedit

richedit

Postby Silvio » Wed Jan 10, 2007 1:11 pm

it is possible insert Image on richedit ?
it is possible insert zoom control on it ?

thanks
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Nop » Wed Jan 10, 2007 1:26 pm

hi, is possible use richedit with get, without an external file, saving in an memo file? someone has a little sample? thanks
User avatar
Nop
 
Posts: 107
Joined: Tue Apr 11, 2006 4:36 pm
Location: Uberaba/Brazil

Postby James Bott » Wed Jan 10, 2007 6:01 pm

Nop,

Search fwh\samples for "richedit" examples.

Since richedit data is contained in a string var you should be able to just save it to a memo field like any other string.

@ 0, 0 RICHEDIT oRich VAR cVar

define button of oBar action ((cAlias)->notes:= cVar)

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Zoom en tRichEdit

Postby César E. Lozada » Wed Jan 10, 2007 10:34 pm

Agregando estos métodos a la clase tRichEdit() podrás hacer zoom, pero si usas la versión 5 de riched20.dll.

Add these methods to tRichEdit() to zoom, but be sure you have riched20.dll version 5 installed.


Saludos/Regards
César Lozada

#define EM_GETZOOM (WM_USER + 224)
#define EM_SETZOOM (WM_USER + 225)

METHOD SetZoom(nZoom)
Local nNum:=nZoom, nDen:=100, k //, nOldZoom:=::GetZoom()
DEFAULT ::nW0:=::nWidth-20
FOR k:=2 to 5 step 3
DO WHILE nNum%k=0 .and. nDen%k=0
nNum/=k; nDen/=k
ENDDO
NEXT
IF nNum>0 .and. nNum<64 .and. nDen>0 .and. nDen<64
::SetSize(::nW0*nZoom/100+20,::nHeight)
::SendMsg(EM_SETZOOM, nNum, nDen)
ENDIF
return nil //nOldZoom

METHOD GetZoom()
Local nZoom,nNum:=0, nDen:=0
::SendMsg(EM_GETZOOM, nNum, nDen)
nZoom:=100*nNum/Max(nDen,1)
return nZoom
User avatar
César E. Lozada
 
Posts: 128
Joined: Wed Oct 26, 2005 12:18 pm
Location: Los Teques, Miranda, Venezuela

Postby Silvio » Thu Jan 11, 2007 12:19 am

thanks cesar

How I must call these functions into testrtf.prg have you an sample for it ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests