-
August 4th, 2006, 02:07 AM
#1
Edit Box color
Hi All,
Does anyone know of any way to change the background white color of Edit Box, and color of its text ?
Any idea will be great.
naim1
-
August 4th, 2006, 02:09 AM
#2
Re: Edit Box color
Yes. Handle the WM_CTLCOLOR and change the colors that you want. There is an example in MSDN on the page for WM_CTLCOLOR (Handling Reflected Messages: An Example of a Reusable control).
-
August 4th, 2006, 02:11 AM
#3
Re: Edit Box color
Hi,
Handle WM_CTLCOLOR and in your OnCtlColor(CDC* pDC, UINT nCtlColor)
function, use
Code:
//set text color
pDC->SetTextColor(RGB(255,255,255));
//set the text's background color
pDC->SetBkColor(RGB(0,0,0));
Oops. Cilu got ahead of me
-
August 4th, 2006, 02:27 AM
#4
Re: Edit Box color
naim, please don't create multiple threads with the same question
-
August 4th, 2006, 05:38 AM
#5
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
|