Print Page | Close Window

GUI Issues for ComboBox & Tab Control

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=20203
Printed Date: 25 August 2025 at 6:59pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: GUI Issues for ComboBox & Tab Control
Posted By: praving@rhubcom.com
Subject: GUI Issues for ComboBox & Tab Control
Date Posted: 05 October 2012 at 5:46am
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 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net