Find the line no. on which the cursor is present?
-
-
Hello, I am not able to find any function which will get me the line no. on which the cursor is present in RichEdit Control in MFC? How to get it? Is there any function to get it? If yes, then what is it? Thanks,
Software Developer Sanjay Khapre
SanjaySMK wrote:
line no. on which the cursor is present in RichEdit Control in MFC
Hmm - never needed that. But does
GetSel()
followed byLineFromChar()
work? -- modified at 7:58 Thursday 17th August, 2006 Just found it in the Doku forLineFromChar()
: "If [the Parameter] nIndex is –1, it specifies the current line, that is, the line that contains the caret."
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation." -- Caius Petronius, Roman Consul, 66 A.D.
-
SanjaySMK wrote:
line no. on which the cursor is present in RichEdit Control in MFC
Hmm - never needed that. But does
GetSel()
followed byLineFromChar()
work? -- modified at 7:58 Thursday 17th August, 2006 Just found it in the Doku forLineFromChar()
: "If [the Parameter] nIndex is –1, it specifies the current line, that is, the line that contains the caret."
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation." -- Caius Petronius, Roman Consul, 66 A.D.