V
Volki69
Guest
We have a C++ Dialog Application and we want to change to Style to Visual Styles.
Without Visual Styles the buttons, EditControls, ComboBox Controls have the same background color in disabled mode.
Wit Visual Styles the buttons, EditControls, ComboBox Controls have different background color in disabled mode.
Without Visual Styles i can change the background color in ON_WM_CTLCOLOR_REFLECT message. With visual Styles i can,t to that.
Do anybody knows why?
How can i change the background color of a CButton or CCombobox with using Visual Style Design?
With this code we change the application to visual Style
#pragma comment(linker, \
"\"/manifestdependency:type='Win32' "\
"name='Microsoft.Windows.Common-Controls' "\
"version='6.0.0.0' "\
"processorArchitecture='*' "\
"publicKeyToken='6595b64144ccf1df' "\
"language='*'\"")
Here we try to change the Color
HBRUSH TDComboBox::CtlColor(CDC* pDC, UINT nCtlColor)
{
switch (nCtlColor)
{
case CTLCOLOR_STATIC:
case CTLCOLOR_EDIT:
{
pDC->SetBkColor(RGB(255, 255, 0));
pDC->SetTextColor(RGB(0, 255, 255));
pDC->SetBkMode(TRANSPARENT);
return mBackBrush;
}
break;
}
return NULL;
}
Continue reading...
Without Visual Styles the buttons, EditControls, ComboBox Controls have the same background color in disabled mode.
Wit Visual Styles the buttons, EditControls, ComboBox Controls have different background color in disabled mode.
Without Visual Styles i can change the background color in ON_WM_CTLCOLOR_REFLECT message. With visual Styles i can,t to that.
Do anybody knows why?
How can i change the background color of a CButton or CCombobox with using Visual Style Design?
With this code we change the application to visual Style
#pragma comment(linker, \
"\"/manifestdependency:type='Win32' "\
"name='Microsoft.Windows.Common-Controls' "\
"version='6.0.0.0' "\
"processorArchitecture='*' "\
"publicKeyToken='6595b64144ccf1df' "\
"language='*'\"")
Here we try to change the Color
HBRUSH TDComboBox::CtlColor(CDC* pDC, UINT nCtlColor)
{
switch (nCtlColor)
{
case CTLCOLOR_STATIC:
case CTLCOLOR_EDIT:
{
pDC->SetBkColor(RGB(255, 255, 0));
pDC->SetTextColor(RGB(0, 255, 255));
pDC->SetBkMode(TRANSPARENT);
return mBackBrush;
}
break;
}
return NULL;
}
Continue reading...