Hi,
I have used background image for sample application. I have GUI issue related to ComboBox & Tab Control.
I have applied the Office-2007 Blue style to the application using following method:
XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions()
| xtpSkinApplyFrame | xtpSkinApplyColors | xtpSkinApplyMetrics); XTPSkinManager()->LoadSkin(m_strStylesPath + _T("Office2007.cjstyles"), _T("NormalBlue.ini")); XTPSkinManager()->SetAutoApplyNewThreads(TRUE);
ComboBox: ComboBox control is not painted well, the drop down items drown as transperent background.
Tab Control: Tab control should have transperent background header. Now it showing theme color for blank space.
For to draw transparent background for all controls I have added ON_WM_CTLCOLOR() message. Please have look code part:
HBRUSH CSkinControlsDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH oHBRUSH = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
int iCtrlId = pWnd->GetDlgCtrlID(); if (iCtrlId == IDC_STATIC ) { pDC->SetTextColor(RGB(0,0,0)); pDC->SetBkMode(TRANSPARENT); return (HBRUSH)GetStockObject(HOLLOW_BRUSH); } if(iCtrlId == IDC_COMBO_VERTICAL || iCtrlId == IDC_COMBO_HORIZONTAL) { pDC->SetBkMode(TRANSPARENT); return oHBRUSH; }
if(iCtrlId == IDC_TAB_SAMPLE) { pDC->SetTextColor(RGB(0,0,0)); pDC->SetBkMode(TRANSPARENT); return oHBRUSH; }
return (HBRUSH)GetStockObject(NULL_BRUSH); }
Please find attached screen capture. Please let me know if I am missing anything. Please direct me to resolve above issue.
https://support.codejock.com/Attachments/20120905-094220_1.png - https://support.codejock.com/Attachments/20120905-094220_1.png uploads/7673/20120905-094220_1.rar - uploads/7673/20120905-094220_1.rar
Thanks & Regards, Pravin
|