Print Page | Close Window

CXTPPropertySheet/CXTPPropertyPage

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=8102
Printed Date: 13 November 2025 at 2:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertySheet/CXTPPropertyPage
Posted By: Kenneth
Subject: CXTPPropertySheet/CXTPPropertyPage
Date Posted: 20 September 2007 at 1:18pm
Does CXTPPropertySheet/CXTPPropertyPage support a gradient caption bar?



Replies:
Posted By: Oleg
Date Posted: 21 September 2007 at 1:01am
Hello,
 
You waste more time to ask question and wait answer than to implement it
:-)
 
Here some template class
 
CXTPPropertyPageStaticCaption::CXTPPropertyPageStaticCaption()
{
};
BEGIN_MESSAGE_MAP(CXTPPropertyPageStaticCaption, CWnd)
 ON_WM_PAINT()
 ON_WM_ERASEBKGND()
END_MESSAGE_MAP()
BOOL CXTPPropertyPageStaticCaption::OnEraseBkgnd(CDC* /*pDC*/)
{
 return TRUE;
}
void CXTPPropertyPageStaticCaption::OnPaint()
{
 CPaintDC dcPaint(this);
 CXTPBufferDC dc(dcPaint);
 CXTPClientRect rc(this);
 dc.FillSolidRect(rc, RGB(221, 231, 238));
 dc.FillSolidRect(rc.left, rc.bottom - 1, rc.Width(), 1, RGB(197, 197, 197));
 rc.DeflateRect(7, 0);
 CString strText;
 GetWindowText(strText);
 dc.SetBkMode(TRANSPARENT);
 dc.SetTextColor(RGB(0, 21, 110));
 CXTPFontDC font(&dc, &XTAuxData().fontBold);
 dc.DrawText(strText, rc, DT_VCENTER | DT_SINGLELINE);
}
 
just modify its OnPaint as you need.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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