Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CXTPControlCustom looks ugly
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPControlCustom looks ugly

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

Joined: 11 January 2010
Location: China
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote gsl_nb Quote  Post ReplyReply Direct Link To This Post Topic: CXTPControlCustom looks ugly
    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:
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 21 January 2010 at 8:50am
Can we see an image of your result?
Back to Top
gsl_nb View Drop Down
Newbie
Newbie
Avatar

Joined: 11 January 2010
Location: China
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote gsl_nb Quote  Post ReplyReply Direct Link To This Post Posted: 21 January 2010 at 10:04pm
THANK YOU FOR YOUR ATTENTION!
 
my post has been modified with imge.
Back to Top
gsl_nb View Drop Down
Newbie
Newbie
Avatar

Joined: 11 January 2010
Location: China
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote gsl_nb Quote  Post ReplyReply Direct Link To This Post Posted: 21 January 2010 at 10:39pm

have i used the wrong ctrl?

which ctrl should be used in this situation?
 
thanks.
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
gsl_nb View Drop Down
Newbie
Newbie
Avatar

Joined: 11 January 2010
Location: China
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote gsl_nb Quote  Post ReplyReply Direct Link To This Post Posted: 23 January 2010 at 1:12am
thanks again!!
I'll give it a try then.
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 24 January 2010 at 7:21am
You'd have to use the SkinFramework for this.
PokerMemento - http://www.pokermemento.com/
Back to Top
gsl_nb View Drop Down
Newbie
Newbie
Avatar

Joined: 11 January 2010
Location: China
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote gsl_nb Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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/
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.172 seconds.