CXTPControlCustom looks ugly |
Post Reply |
Author | |
gsl_nb
Newbie Joined: 11 January 2010 Location: China Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 18 January 2010 at 10:59pm |
I Created a dialog, then embed in the ribbon bar, but it looks ugly compared to other ctrls on the ribbon bar.
Even I tried the dialog's fuctions:OnCtlColor and OnEraseBkgnd,I cannot managed to make it exactly like other ctrls on the ribbon.
like this:
|
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 891 |
Post Options
Thanks(0)
|
Can we see an image of your result?
|
|
gsl_nb
Newbie Joined: 11 January 2010 Location: China Status: Offline Points: 7 |
Post Options
Thanks(0)
|
THANK YOU FOR YOUR ATTENTION!
my post has been modified with imge.
|
|
gsl_nb
Newbie Joined: 11 January 2010 Location: China Status: Offline Points: 7 |
Post Options
Thanks(0)
|
have i used the wrong ctrl? which ctrl should be used in this situation?
thanks.
|
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 891 |
Post Options
Thanks(0)
|
I have not used it but there is a CXTPDialogBar. It has a SetMenuBar method that takes a command bar object in which you can insert CJ controls. You may want to add a CJ combo box and control buttons to it.
There is also a CXTPDialog (same base class I believe as the dialog bar and has the SetMenuBar method on it).
I'm not sure if you can set a theme or a paint manager. Perhaps the dialog will obtain one from the ribbon.
Alternatively you can do your own painting by getting hold of the theme colors CJ uses to paint the background and/or controls. But it is much easier to use the CJ ones when you can.
I wonder what happens if you try to add your control to the QAT?
|
|
gsl_nb
Newbie Joined: 11 January 2010 Location: China Status: Offline Points: 7 |
Post Options
Thanks(0)
|
thanks again!!
I'll give it a try then.
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
You'd have to use the SkinFramework for this.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
gsl_nb
Newbie Joined: 11 January 2010 Location: China Status: Offline Points: 7 |
Post Options
Thanks(0)
|
i've tried some style themes cj gives.but it still cannot achieve the ribbon style exactly.
it seems there is no solution.
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Yes, there is!
XTPOffice2007Images()->SetHandle(hSkinModule, _T("OFFICE2007BLUE.INI")); // hSkinModule is my DLL with the CJ skin
XTPSkinManager()->LoadSkin(NULL, _T("NormalBlue.ini")); |
|
PokerMemento - http://www.pokermemento.com/
|
|
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 |