Handling OnCtlColor()

HBRUSH CPlayBackQueryDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);

// TODO: Change any attributes of the DC here

if(nCtlColor == CTLCOLOR_DLG)
{
return gbrushDlgBkGround;
}
else if(nCtlColor == CTLCOLOR_EDIT)
{
pDC->SetTextColor(guiEditTextColor());
pDC->SetBkColor(gclrEditBk);
return gbrEditBk;
}
else if(nCtlColor == CTLCOLOR_STATIC)
{
pDC->SetBkMode(TRANSPARENT);
return gbrBlueRectBk;
}
else
return gbrushDlgBkGround;
// TODO: Return a different brush if the default is not desired
return hbr;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: