Print Page | Close Window

How to Render Using CXTPPaintManager

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=7326
Printed Date: 12 November 2025 at 11:52pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to Render Using CXTPPaintManager
Posted By: jmatthias
Subject: How to Render Using CXTPPaintManager
Date Posted: 07 June 2007 at 1:58pm
 
I am creating a new control from scratch (similar to the Outlook pager). I would like to use the CXTPPaintManager to render certain parts of my control but I can't find any examples for how to go about doing this.
 
What is the correct way to get an instance of CXTPPaintManager? I am currently using:
 
m_pPaintManager = CXTPPaintManager::CreateTheme(xtpThemeOffice2003);
 
Is this correct?
 
When I use the paint manager like this:
 
void CFooBar::OnPaint()
{
  CPaintDC dc(this); // device context for painting
 
  m_pPaintManager->DrawRectangle(&dc, rectCaption, FALSE,FALSE,TRUE, FALSE, FALSE, xtpBarTypeNormal, xtpBarLeft);
}
 
I don't get a rectangle drawn.
 
Can anybody help?
 
Joel



Replies:
Posted By: Oleg
Date Posted: 08 June 2007 at 1:13am
Hello,
Yes, you have right code.
 
In Offfice2003 theme not Selected/pressed state draws nothing. try to set bSelected parameter to TRUE.


-------------
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