selected text in a Edit Box
-
how to chang the foreground/background color of selected text in a Edit Box? Hello World
selected text??? Well you can handle
WM_CTLCOLOREDIT
which will change the color of all your text and background inside the edit, which I think might change your selection color (if selection is drawn using an XOR) Actually I think those colors are stored inGetSysColor()
so I think your out of luck without resorting to subclassing it'sWM_PAINT
message...however be forewarned...from personal experience...WM_PAINT
is not the only place edit controls draw from...atleast it seemed to me :) They paint inside WM_CHAR and everything...it's really quite annoying... p.s-You could maybe intercept the selection of an edit control (using a hi-res timer to repeat check if selection has changed and if it has) change the global settings of foregroudn and text selection colors. This should work because only a single control can have focus at any given time...then when your done with the control return colors back to default. Cheers :) How do I print my voice mail? -
selected text??? Well you can handle
WM_CTLCOLOREDIT
which will change the color of all your text and background inside the edit, which I think might change your selection color (if selection is drawn using an XOR) Actually I think those colors are stored inGetSysColor()
so I think your out of luck without resorting to subclassing it'sWM_PAINT
message...however be forewarned...from personal experience...WM_PAINT
is not the only place edit controls draw from...atleast it seemed to me :) They paint inside WM_CHAR and everything...it's really quite annoying... p.s-You could maybe intercept the selection of an edit control (using a hi-res timer to repeat check if selection has changed and if it has) change the global settings of foregroudn and text selection colors. This should work because only a single control can have focus at any given time...then when your done with the control return colors back to default. Cheers :) How do I print my voice mail? -
emmm... it looks a bit complex. i will take your constructive advice. While, a great thanks.;) Hello World
It'll pose for an interesting challenge... How do I print my voice mail?
-
how to chang the foreground/background color of selected text in a Edit Box? Hello World
This article indirectly shows how to do that.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)