How to change background color of a dynamically created CEdit control 
Author Message
 How to change background color of a dynamically created CEdit control

In a CView, I dynamically created a CEdit control as the CView's child. I
try to catch the message WM_CTLCOLOR by override the OnCtlColor funtion in
my CView derived view, but it doesn't work.


Sat, 05 Jul 2003 15:02:23 GMT  
 How to change background color of a dynamically created CEdit control
It should work. Do you  have the ON_WM_CTLCOLOR() entry in the message map
of the view?

--
Ajay Kalra [MVP - VC++]

Note: Please post all replies to newsgroup only.


Quote:
> In a CView, I dynamically created a CEdit control as the CView's child. I
> try to catch the message WM_CTLCOLOR by override the OnCtlColor funtion in
> my CView derived view, but it doesn't work.



Sat, 05 Jul 2003 15:57:09 GMT  
 How to change background color of a dynamically created CEdit control
You need ON_WM_CTLCOLOR_REFLECT()!!! The WM_CTLCOLOR get sent to the parent
of the edit contorl.  You need to tell the message map that you want it
reflected back to you.

Ali


Quote:
> In a CView, I dynamically created a CEdit control as the CView's child. I
> try to catch the message WM_CTLCOLOR by override the OnCtlColor funtion in
> my CView derived view, but it doesn't work.



Sun, 06 Jul 2003 00:47:04 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Changing the default background color of disabled control (CEdit)

2. Change background color of disabled CEdit controls

3. Changing the Background Color of Individual CEdit controls in a CDialogBar

4. Changing color of background of a CEdit control

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

6. How to change background color Of CEdit?

7. How to change background color of CEdit?

8. Changing CEdit background COLOR on FOCUS????

9. Change background color of CEdit in CEditView

10. change the CEdit Background color - but tricky!

11. How to change CEdit window background color without derivation from it a new class

12. background color of CEdit control

 

 
Powered by phpBB® Forum Software