-
August 19th, 2012, 12:20 AM
#1
23h,10 stackoverflow
I'm Working on RichEdit Control, so when i paste the below code, cursor has to go directly to that location and write some text in rich edit control. So please suggest, i will proud if send some sample code.
23H,10 STACKOVERFLOW : Cursor has to go 23rd row and 10th column and need to write the text like shown.... In RichEdit Control.
Thanks in advance to all coders..
Regards
Sam
(Note: I have tried with GetSel,SetSel,GetCaretPos, SetCaretPos not solved my problem)
-
August 19th, 2012, 02:36 AM
#2
Move Cursor position in RichEdit Control
Hi All!!
I'm Working on RichEdit Control, so when i paste the below code, cursor has to go directly to that location and write some text in rich edit control. So please suggest, and provide some sample code.
23H,10 CodeGuru : Cursor has to go 23rd row and 10th column and need to write the text like shown.... In RichEdit Control.
Thanks in advance to all coders..
Regards
Sam
(Note: I have tried with GetSel,SetSel,GetCaretPos, SetCaretPos not solved my problem, cursor moved by pixel wsie)
-
August 19th, 2012, 04:34 AM
#3
Re: 23h,10 stackoverflow
Originally Posted by mr.sam1024
I'm Working on RichEdit Control, so when i paste the below code...
And where is this code?
Victor Nijegorodov
-
August 19th, 2012, 04:37 AM
#4
Re: Move Cursor position in RichEdit Control
Hmm... The same question under another title?
And still no any code despite the promise:
Originally Posted by mr.sam1024
i paste the below code
Victor Nijegorodov
-
August 19th, 2012, 07:02 AM
#5
Re: 23h,10 stackoverflow
I Specified the code, that is here.. 23H,10. It means that 23rd row and 10column. So when i paste this code on richedit control.. cursor has to go directly to the 23rd row and 10 column location. And write some text at that position.
Please do the needful VictorN.
Thanks
Sam
-
August 19th, 2012, 07:09 AM
#6
Re: 23h,10 stackoverflow
Originally Posted by mr.sam1024
I Specified the code, that is here.. 23H,10. It means that 23rd row and 10column.
And where is that place that you called "here"?
Victor Nijegorodov
-
August 19th, 2012, 07:18 AM
#7
Re: 23h,10 stackoverflow
write 23H,10 in notepad and copy it. and then paste on richedit control. then cursor has to go 23rd row and 10 column.
I hope this information is clear to you.
-
August 19th, 2012, 11:10 AM
#8
Re: 23h,10 stackoverflow
Originally Posted by mr.sam1024
write 23H,10 in notepad and copy it. and then paste on richedit control. then cursor has to go 23rd row and 10 column.
I hope this information is clear to you.
So let me try to restate what you're asking, since you seem to have trouble asking the question:
"I would like to know if there is a way to paste text into a CRichEditCtrl at a certain row and column position."
Is that the question?
Regards,
Paul McKenzie
-
August 19th, 2012, 12:20 PM
#9
Re: 23h,10 stackoverflow
Originally Posted by mr.sam1024
I hope this information is clear to you.
Nope.
-
August 20th, 2012, 02:25 AM
#10
Re: 23h,10 stackoverflow
EM_LINEINDEX - go to the desired line
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Code:
SendMessage(hWnd, EM_LINEINDEX, (WPARAM)23, 0);
EM_SETSEL - make a selection, where the text is to be inserted
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Code:
SendMessage(hWnd, EM_SETSEL, 10, 10);
EM_REPLACESEL - replace the selection with a new text
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Code:
SendMessage(hWnd, EM_REPLACESEL, (WPARAM)TRUE, (LPARAM)"STACKOVERFLOW");
-
August 20th, 2012, 02:28 AM
#11
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|