CEdit controls and changing the font color 
Author Message
 CEdit controls and changing the font color

I am trying to change the colors of a CEdit control.  I am able to change
all of the colors, or weed out a specific control.  however, what I really
need to do, is to be able to call up a function, and specifically change
just the color on that control, to one I specify.  What I need is some ideas
on how one might achieve this.  I assume I will want to send a message
(WM_CTLCOLOR), forcing it to activate the overridden OnCtlColor().  What I
really cannot figure out, is how can i force a particular control to be the
one changed, and how I would pick the color.  Any ideas?

Thanks from a greenie . . .

Mark



Mon, 22 Jan 2001 03:00:00 GMT  
 CEdit controls and changing the font color
afx_msg HBRUSH OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor )
provides a means of assigning a control a specific color.
The pWnd identifies the control. The Control-ID can be retrieved via
pWnd->GetDlgItemID() which returns the control-ID as assigned in the dialog
editor.
OnCtlColor must be derived in the window, which contains the controls.
OnCtlColor is called when the window is displayed the first time ( and
hopefully but tested when the window is redrawn after a call to
CWnd::UpdateWindow() )




Mon, 22 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Change font and color in CEdit end/or CStatic

2. how to set the color of font for a CEdit Control

3. Changing Font in CEdit control

4. Changing the font of a CEdit control (non dialog)

5. How can I change the font of a CEdit control

6. How to change the font size for a CEdit control

7. changing font on a CEdit control

8. How to change font of run-time CEdit controls

9. Changing Font in a CEdit control

10. CEdit control .. change Font selection

11. Changing the font of a multiline CEdit Control

12. Changing font style in CEdit derived control.

 

 
Powered by phpBB® Forum Software