Print Page | Close Window

CXTPControlCustom looks ugly

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=16038
Printed Date: 21 December 2024 at 9:15pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPControlCustom looks ugly
Posted By: gsl_nb
Subject: CXTPControlCustom looks ugly
Date 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:



Replies:
Posted By: rdhd
Date Posted: 21 January 2010 at 8:50am
Can we see an image of your result?


Posted By: gsl_nb
Date Posted: 21 January 2010 at 10:04pm
THANK YOU FOR YOUR ATTENTION!
 
my post has been modified with imge.


Posted By: gsl_nb
Date Posted: 21 January 2010 at 10:39pm

have i used the wrong ctrl?

which ctrl should be used in this situation?
 
thanks.


Posted By: rdhd
Date Posted: 22 January 2010 at 12:04pm
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?


Posted By: gsl_nb
Date Posted: 23 January 2010 at 1:12am
thanks again!!
I'll give it a try then.


Posted By: znakeeye
Date Posted: 24 January 2010 at 7:21am
You'd have to use the SkinFramework for this.

-------------
PokerMemento - http://www.pokermemento.com/


Posted By: gsl_nb
Date Posted: 28 February 2010 at 10:32pm
i've tried some style themes cj gives.but it still cannot achieve the ribbon style exactly.
it seems there is no solution.


Posted By: znakeeye
Date Posted: 24 April 2010 at 6:11am
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/



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