Code Comments
Programming Forum and web based access to our favorite programming groups.hello, I have Memo (or RichEdit) with WordWrap=True option. I have 2 problems: 1. I want get edited line number, but like WordWrap=False 2. I want get value of Lines[n], but like WordWrap=False I tried - .CaretPos.y - .Lines[n] - switch WordWrap=True temporary but it doesn't work. Can you help me? Tankseruba
Post Follow-up to this messageTankseruba wrote: > hello, > > I have Memo (or RichEdit) with WordWrap=True option. > > I have 2 problems: > 1. I want get edited line number, but like WordWrap=False > 2. I want get value of Lines[n], but like WordWrap=False > > I tried > - .CaretPos.y > - .Lines[n] > - switch WordWrap=True temporary > > but it doesn't work. > > Can you help me? > > Tankseruba look at the EM_CHARFROMPOS in the win32 help you need to pass the X,Y Mouse locations to that message it will return the line index and charactor index. you need to use the SendMessage(Memo1.handle, EM_CHARFROMPOS,MAKELPARAM(X,Y)); the return value is a DWORD (double word), the low word is the charactor index and the high order word line index. etc..
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.