Click here to Skip to main content
15,894,410 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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..

Ex.. 
[ - 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.

Thanks
Arjun
Posted

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
 
Share this answer
 
Comments
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>https://www.google.com.au/search?rlz=1C1CHNY_enAU391AU391&sugexp=chrome,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.15.14.0.0.0.11.397.4269.2-1j12.13.0...0.0.ZbYwQMsPI6s&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&fp=3cee0fc66ae1632c&biw=1680&bih=965</link>
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900