FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour RichEdit - how to capture the line
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
RichEdit - how to capture the line
Posted: Sun Mar 24, 2013 08: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
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: RichEdit - how to capture the line
Posted: Sun Mar 24, 2013 09:34 PM
Try something like this:

Code (fw): Select all Collapse
#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
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: RichEdit - how to capture the line
Posted: 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
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: RichEdit - how to capture the line
Posted: Mon Mar 25, 2013 01:05 PM

resolved: oRichEdit:getline()

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles“C
TDolphin
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: RichEdit - how to capture the line
Posted: Mon Mar 25, 2013 01:20 PM

Wonderful! :-)

EMG

Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: RichEdit - how to capture the line
Posted: Mon Mar 25, 2013 02:23 PM

Thanks Enrico! :)

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles“C
TDolphin

Continue the discussion