Line and Col Positioning
- Posted by spent memory <spent.memory at gmail.com> Oct 14, 2004
- 478 views
can anyone tell me why these 2 lines get the line and column index correctlly sometmes with the richedit control i am using, and why it doesn't get them correctlly, fo example if i start of at line 1, col 1 and start tapping the down arrow it increment correctly line 2, line 3 etc but when i turn around and start hitting the up arrow it takes about 2 hits and then starts incrementing down, i cannot work out whether this is due to the way the richedit handles {13,10} - "\n","\r" , if so does anyone know the flags i should be initialising it with :- code below Line = sendMessage(code,EM_LINEFROMCHAR,-1,0) Col = w32lo_word(sendMessage(code,EM_GETSEL,0,0)) - sendMessage(code,EM_LINEINDEX,-1,0) thanks Joe