Print Page | Close Window

CXTPControl colors

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=4829
Printed Date: 11 November 2025 at 2:41am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPControl colors
Posted By: winxp
Subject: CXTPControl colors
Date Posted: 18 August 2006 at 9:39am
Hello,
 
I'm using the following code:
CXTPControl* pC = (CXTPControl*)CXTPControlButton::CreateObject();
 
And its ok. What I need, is to change the background color of the CXTPControl.
 
Is it possible ?
 
Regards



Replies:
Posted By: winxp
Date Posted: 02 September 2006 at 8:32am
help please.


Posted By: Oleg
Date Posted: 02 September 2006 at 9:05am
Hi,
You can create custom button:
 
class CMyButton : public CXTPControlButton
{
DECLARE_XTP_CONTROL(CMyButton )
public: void Draw(CDC* pDC);
};
in cpp:
IMPLEMENT_XTP_CONTROL(CMyButton , CXTPControlButton)
void CMyButton ::Draw(CDC* pDC)
{
   //fill background and call base class: 
    pDC->FillSolidRect(GetRect(), 0xFF);
    CXTPControlButton::Draw(CDC* pDC)
}
 
and use it:
CXTPControl* pC = new CMyButton();


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