Click here to Skip to main content
13,350,486 members (62,556 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi All!

Need help on Rich Edit control..

I'm working on VT100 terminal escape sequences..

According to escape sequences cursor need to jump to that location..

[ - Esc code
23 - is the column no
10 - is the row no

So if i receive  this sequence directly i need to place the cursor at 23 col and 10 row position in Rich Edit control..

Pls let me know which API function can work.. send some sample code will be most appreciated.

Posted 10-Jun-12 20:43pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

have a look at EM_EXSETSEL[^] and EM_EXGETSEL[^]

I think you're on a hiding to nothing trying to write an emulator in richedit IMO
tgm.arjun09 11-Jun-12 23:32pm
Did u tried with EM_EXSETSEL.. will it place the cursor if it receives the sequence at 23 col and 10 row ?
EM_EXSETSEL it selects range of characters... but where it will place the cursor ?
barneyman 12-Jun-12 2:07am
I haven't, no - i got that from Google <link>,mod=9&sourceid=chrome&ie=UTF-8&q=moving+the+caret+in+a+richedit+control#hl=en&rlz=1C1CHNY_enAU391AU391&sclient=psy-ab&q=position+caret+in+a+richedit+control&oq=position+caret+in+a+richedit+control&aq=f&aqi=&aql=&gs_l=serp.3...9136.11854.1.12174.,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&fp=3cee0fc66ae1632c&biw=1680&bih=965</link>
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

1. resize rich edit and one more application so that both u can see on screen.
2. click in another application.
3. then click in rich edit,cursor will blink in old position in rich edit still while it should be placed where user clicked in rich edit.

can any one help me to resolve it.

please let me know if more info required.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180111.1 | Last Updated 18 Sep 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100