Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPControl colors
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPControl colors

 Post Reply Post Reply
Author
Message
winxp View Drop Down
Newbie
Newbie
Avatar

Joined: 28 October 2003
Location: Israel
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote winxp Quote  Post ReplyReply Direct Link To This Post Topic: CXTPControl colors
    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
Back to Top
winxp View Drop Down
Newbie
Newbie
Avatar

Joined: 28 October 2003
Location: Israel
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote winxp Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2006 at 8:32am
help please.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.048 seconds.