![]() |
CXTButton SetColorFace |
Post Reply ![]() |
Author | |
DoubleHammer ![]() Newbie ![]() ![]() Joined: 07 March 2008 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() Posted: 09 March 2008 at 5:29pm |
Hi,
I have a CFormView view with a couple of buttons on it which are subclassed as CXTButton types. I want to be able to set their face colors to different colors when the form is initialy updated and also during run time. When I set the color, all the buttons assume the same color as the button which had the last SetColorFace function called on it.
Can I do what I want to do with the CXTButton type?
Thanks in advance.
|
|
![]() |
|
rmercer ![]() Groupie ![]() Joined: 22 February 2006 Status: Offline Points: 34 |
![]() ![]() ![]() ![]() ![]() |
If I recall correctly, the buttons share the application theme unless you've specifically overridden it using SetTheme since the colors are defined in the theme. So to have different face colors you have to actually create and assign a new dedicated theme to each button... ie:
m_btnContinue.SetTheme(new CXTButtonThemeOffice2003); ((CXTButtonThemeOfficeXP*)m_btnContinue.GetTheme())->UseWordTheme(FALSE); m_btnContinue.SetXButtonStyle(BS_XT_SHOWFOCUS); m_btnContinue.SetIcon(CSize(32, 32), IDI_YOURICON); m_btnContinue.SetColorFace(m_crYourColor); |
|
![]() |
|
DoubleHammer ![]() Newbie ![]() ![]() Joined: 07 March 2008 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
Hi Thanks for that. It has pointed me in the right direction.
|
|
![]() |
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 |