RichEdit - how to capture the line

RichEdit - how to capture the line

Postby MGA » Sun Mar 24, 2013 8:42 pm

how to capture the line where the cursor is positioned?

ex:

aaaaa
bbbbb <--cursor here
ccccc

? orich:cLine -> bbbbb

thanks
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: RichEdit - how to capture the line

Postby Enrico Maria Giordano » Sun Mar 24, 2013 9:34 pm

Try something like this:

Code: Select all  Expand view
#define WM_USER 1024
#define EM_EXLINEFROMCHAR (WM_USER + 54)

? oRichEdit:SendMsg( EM_EXLINEFROMCHAR, 0, -1 ) + 1


At least it works from C language.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: RichEdit - how to capture the line

Postby MGA » Mon Mar 25, 2013 12:59 pm

Enrico, thank you for responding.

The code only returns the row number. I need the contents of the line. Can you help?
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: RichEdit - how to capture the line

Postby MGA » Mon Mar 25, 2013 1:05 pm

resolved: oRichEdit:getline()
Last edited by MGA on Mon Mar 25, 2013 2:23 pm, edited 1 time in total.
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá


Re: RichEdit - how to capture the line

Postby MGA » Mon Mar 25, 2013 2:23 pm

Thanks Enrico! :)
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests