469,576 Members | 1,819 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,576 developers. It's quick & easy.

Problems with EM_GETLINE for RichEdit

I am developing a word processor using MS Vis C++ 6 with MFC.

I need to get the text of the current line of where the cursor is. I am
using richedit (not a control).

Does the EM_GETLINE work when not used with a control? i.e. when RichEdit
is the document view.

I've got the following syntax :

CVIProDoc* pDoc = GetDocument(); //pointer to the
document
int iLineNo = 0;
//will be updated on cursor move, 0 for test purposes
LPCTSTR lpszText; //hopefully
the resultant text
long lResult;
lResult = SendMessage( *pDoc, EM_GETLINE, iLineNo, lpszText);

I keep getting the error "error C2660: 'SendMessageA' : function does not
take 4 parameters".

any ideas what i'm doing wrong? any help would be much appreciated.

-peter
Jul 23 '05 #1
1 3716
* Peter Taylor:
[off-topic in clc++]


Don't cross-post off-topic stuff to clc++, please.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by murlbrown | last post: by
1 post views Thread by P | last post: by
1 post views Thread by Patty O'Dors | last post: by
10 posts views Thread by Patty O'Dors | last post: by
reply views Thread by murlbrown | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.