change text color in CEdit 
Author Message
 change text color in CEdit

I will use a CEdit Control to simulate a screen. But if I use the CEdit
function like SetSel and ReplaceSel to make write where I want I don't know
how to change the back and text color.
If I use the DC to change the text and back color I don't know how to select
a fixed font. The SelectObject function with the ANSI_FIXED_FONT does not
work.

If somene can help me ??

Thank you very much

Sylvain



Sun, 10 Dec 2000 03:00:00 GMT  
 change text color in CEdit

    Override the WM_CTLCOLOR message in the parent, and you can change the
colors, etc there (look at the help). Use CDC::SelectStockObject instead of
SelectObject. You could do that in OnCtlColor as well.
- Doug S.

Quote:

> I will use a CEdit Control to simulate a screen. But if I use the CEdit
> function like SetSel and ReplaceSel to make write where I want I don't know
> how to change the back and text color.
> If I use the DC to change the text and back color I don't know how to select
> a fixed font. The SelectObject function with the ANSI_FIXED_FONT does not
> work.

> If somene can help me ??

> Thank you very much

> Sylvain



Sun, 10 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Question on changing text color in CEdit Control

2. Changing text color in a CEdit box

3. Changing Background Color of CEdit - Problem With Double Clicking On Texts

4. how to change the text color of a CEdit or static control

5. Changing the color of the selected text in a CEdit control

6. Change CButton color and CButton text color in CDialog

7. Changing text colors(2 different colors) in ToolTips

8. Change text color and background color in CEditView

9. Change a part of Background color or a part of text color from CListCtrl

10. Background & Text color CEdit

11. CEdit text color

12. coloring text in CEdit or....?

 

 
Powered by phpBB® Forum Software