|
-
May 17th, 1999, 12:56 AM
#1
Coloring readonly edit control
Hello,
I wanted to change the background color of the "Read Only" Edit control.
I have tried overriding the "OnCtlColor" but in vain. :-(
Please help me out. Any valuable suggestion is very much appreciated.
-Annie
-
May 17th, 1999, 02:47 PM
#2
Re: Coloring readonly edit control
hi!
your OnCtlColor have to be like this:
CBrush m_color;
HBRUSH (name of your project)::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
return m_color;
}
and you have to do one more thing . in your OnInitDialog() you have to put this funktion:
m_color.CreateSolidBrush(RGB(50, 45, 243));
i hope that works.
-
May 18th, 1999, 02:13 AM
#3
Re: Coloring readonly edit control
Thanks for the reply. I had posted the same query under "beginner" category
under the subject title "Save me" posted on 5/17. Got answers there
and the thing is now up and working.
-Thank u all once again,
-Annie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|