Another RichEdit problem: CFE_LINK

Started by
1 comment, last by Evil Steve 20 years, 1 month ago
Ok, i decided to go ahead and write my own URL detector. I get more control over it this way anyway. But, it seems that setting the CFE_LINK effect causes the text to be made into a ''standard'' URL - it changes the colour from blue to white. Heres some screenshots: First, without setting the CFE_LINK flag: Thats how its supposed to look - underlined, and blue. Now i set the CFE_LINK effect too (and dont change anything else): And it decides to change the colour to white. WTF? Does anyone know why the hell its doing this, and if theres any way of stopping it? Cheers, Steve
Advertisement
I just tried setting just the colour (not underlineing it), and then setting the CFE_LINK effect, and it underlined it too.

Also, i''ve done SendMessage(m_hWnd,EM_AUTOURLDETECT,FALSE,0), so it shouldn''t be interfering with it.

The reason the RichEdit turns the link white instead of blue is that the backgrouns is black (although you can''t see it because its an image). I don''t know what thats about, but still...
*bump*
This is the effect of adding the text, then trying to set the first 15 chars to be red after the text has been added:

It seems to ignore the formatting over CFE_LINK text.

Can anyone help? I *really* don''t want to have to do what i did with my previous client, and watch the users mouse pointer and check if its over a URL whenever it moves, etc etc.

This topic is closed to new replies.

Advertisement