How to change Windows selected text color?

Quote
Ashley Bass wrote:

> I need to be able to change the color of selected text depending on
> what is happening in my application and can't figure out what property
> or API call needs to be made.

        If you're talking about the color of selected text in a
standard edit control that's something specified by the user;
changing it would amount to revising the user's configuration
for him, which most users probably wouldn't appreciate. (Why
do you "need" to do this?)

        Similarly with a RichEdit control I'm pretty sure you
can't change the background color of a selection without
altering the user's configuration. But with a RichEdit you
could easily change the color of part of the text itself.
(The easiest way is to momentarily change the selection via
SelStart and SelLength, change the color of the selected text
via SelAttributes.Color, then put the selection back to what
it was.)

--
David Ullrich

?his ?s ?avid ?llrich's ?ig ?ile
(Someone undeleted it for me...)