hello there,
i am trying to convert a program in assembler
MindWeb 900k
it is something like hypertext help interfaces (eg. spASM AsmTut, old Norton Guide).
so i use RichEdit control for text (simple edit text doesnt support custom text only for whole
textarea). after playing i managed to recognize URLs (EM_AUTOURLDETECT & EN_LINK
nightmare) and now i am trying to get the text when the user press mouse button.
the ideea is something like this:
1. user type text
2. user click on text
3. if text is enclosed in [] then open filename with the name from the brackets
eg: opens "this is a file.txt"
4. right click - opens previous file
i'm stuck on part 3 - getting the text and parsing for []. i cannot get the text with
EM_CHARFROMPOS.
any help on this ?
thanks ...
i am trying to convert a program in assembler
MindWeb 900k
it is something like hypertext help interfaces (eg. spASM AsmTut, old Norton Guide).
so i use RichEdit control for text (simple edit text doesnt support custom text only for whole
textarea). after playing i managed to recognize URLs (EM_AUTOURLDETECT & EN_LINK
nightmare) and now i am trying to get the text when the user press mouse button.
the ideea is something like this:
1. user type text
2. user click on text
3. if text is enclosed in [] then open filename with the name from the brackets
eg: opens "this is a file.txt"
4. right click - opens previous file
i'm stuck on part 3 - getting the text and parsing for []. i cannot get the text with
EM_CHARFROMPOS.
any help on this ?
thanks ...
Hi TBD
1. Do a backwards search for '[' and save the position. (EM_FINDTEXTEX)
2. Do a forwards search for ']' and save position. (EM_FINDTEXTEX)
3. Set selection. (EM_EXSETSEL)
4. Get the text in beetween. (EM_GETSELTEXT)
KetilO
1. Do a backwards search for '[' and save the position. (EM_FINDTEXTEX)
2. Do a forwards search for ']' and save position. (EM_FINDTEXTEX)
3. Set selection. (EM_EXSETSEL)
4. Get the text in beetween. (EM_GETSELTEXT)
KetilO
thanks KetilO,
but how can i get the position in the text from mouse (WM_LBUTTONDOWN) ?
on EM_CHARFROMPOS, 0, lParam it GPFs
but how can i get the position in the text from mouse (WM_LBUTTONDOWN) ?
on EM_CHARFROMPOS, 0, lParam it GPFs
hi...
please look here
okay this isn't richedit but it should point you in the right direction. the example in the last
post shows how to parse text in a normal edit box and extend it's functionality (make it
able to recognize full working links)
please look here
okay this isn't richedit but it should point you in the right direction. the example in the last
post shows how to parse text in a normal edit box and extend it's functionality (make it
able to recognize full working links)
Hi TBD
EM_CHARFROMPOS in a richedit wants a pointer to a POINT struct.
When user left click the caret should be on the word.
Try using EM_EXGETSEL.
KetilO
EM_CHARFROMPOS in a richedit wants a pointer to a POINT struct.
When user left click the caret should be on the word.
Try using EM_EXGETSEL.
KetilO