![]() |
CXTPControl colors |
Post Reply
|
| Author | |
winxp
Newbie
Joined: 28 October 2003 Location: Israel Status: Offline Points: 18 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTPControl colorsPosted: 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
|
|
![]() |
|
winxp
Newbie
Joined: 28 October 2003 Location: Israel Status: Offline Points: 18 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 September 2006 at 8:32am |
|
help please.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |