|
-
March 29th, 1999, 10:55 AM
#1
Problem with changing color of Static box
Hello
HBRUSH COptionsDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
CWnd* StaticWnd;
StaticWnd = GetDlgItem(IDC_COLORPICK);
if(nCtlColor == CTLCOLOR_STATIC && StaticWnd == pWnd)
MessageBox("Static color event" ;
// TODO: Return a different brush if the default is not desired
return hbr;
}
The if statement is always FALSE, and i can't grab my Static box to change it color...
please help me
Thank You
P.S.
also i don't know what is the way of changing color of this static control...maybe fillsolidrect????
-
March 29th, 1999, 11:59 PM
#2
Re: Problem with changing color of Static box
Hi,
Compare the window handles.
And to change the color of the static box, create a brush using CBrush().
Good Luck.
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
|