Print Page | Close Window

Customization and Embedded Controls

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=139
Printed Date: 28 April 2024 at 7:10pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Customization and Embedded Controls
Posted By: erichf
Subject: Customization and Embedded Controls
Date Posted: 19 August 2003 at 9:27pm

Howdy,

I'd appreciate it if you could help out with a couple of questions.

1.  I'm trying to tweak the toolbars for a particular behaviour, but don't seem to be getting the right combination (I figured it was in SetCustomizeMode or EnableCustomization, but haven't been successful).  Basically, I'd like to hide the dropdown icon for toolbar customization altogether...at the same time, I don't want to disable the behaviour where chevrons are displayed when the toolbar is only partially available.

2.  I am interested to know if I can embed standard MFC controls in the toolbar or just CXTPControl types?  I wanted to embed CAnimateCtrl, but wasn't successful.

3.  Your sample application that demonstrates XP themes doesn't appear to be showing the XP style drop-down.  Is this something that can be fixed?

4.  Finally, this might be a dumb question, but how do I disable Docking?  I was expecting to be able to pass FALSE to EnableDocking, but don't see an alternative.

Thanks in advance for your assistance,

Erich




Replies:
Posted By: Oleg
Date Posted: 21 August 2003 at 8:41am

1. I will add the flag to manipulate this behavior.

2.The next release will contain samples of it.

3. You can create custom theme derived from CXTPNativeXPTheme.

4. pToolBar->EnableDocking(0); doesn't work?



Posted By: Oleg
Date Posted: 21 August 2003 at 8:58am

here custom theme:

class CNativeThemeEx : public CXTPNativeXPTheme

{

protected:

CSize DrawControlToolBarParent(CDC* pDC, CXTPControl* pButton, BOOL bDraw)

{

if (!m_themeToolbar.IsAppThemed())

return CXTPNativeXPTheme::DrawControlToolBarParent(pDC, pButton, bDraw);

if (pButton->GetType() != xtpControlButtonPopup)

return CXTPNativeXPTheme::DrawControlToolBarParent(pDC, pButton, bDraw);

CSize sz = CXTPNativeXPTheme::DrawControlToolBarParent(pDC, pButton, bDraw);

if (bDraw)

{

CRect rcButton = pButton->GetRect();

CPoint pt = CPoint(rcButton.right - 7, rcButton.CenterPoint().y);

Triangle(pDC, CPoint(pt.x - 2 , pt.y - 1), CPoint(pt.x + 2, pt.y - 1), CPoint (pt.x, pt.y + 1), pDC->GetTextColor());

}

return CSize (sz.cx + 7, sz.cy);

}

};

 

 

usage:

 

CXTPPaintManager::SetCustomTheme(new CNativeThemeEx);



Posted By: erichf
Date Posted: 21 August 2003 at 4:43pm

Thanks for your prompt responses Oleg,

Some comments:

1. I will add the flag to manipulate this behavior.

>>Thank you.

 

2.The next release will contain samples of it.

>>When will the next release be out approximately?

 

3. You can create custom theme derived from CXTPNativeXPTheme.

>>Thanks for the code sample, I'll work with it.

 

4. pToolBar->EnableDocking(0); doesn't work?

>>I was looking at the wrong method (EnableDocking on CXTPCommandBars which has no arguments).  I did notice, though, that once I disabled docking that xtpFlagStretched was ignored and the chevrons didn't appear when I shrunk the frame (it just shifts the entire toolbar down).  It seems to me that the docking behaviour shouldn't affect the chevrons or stretching.  Is this by design?

 

You've done some great work here, I'm looking forward to the next release...

 

-Erich

 



Posted By: Oleg
Date Posted: 27 August 2003 at 11:57pm

All features you asked added. Next release will be in the mid of september.

4. Sorry, to disable docking but not to change wrapping behaviour call

pToolBar->EnableDocking(xtpHideWrap);

and

pMenulBar->EnableDocking(xtpFlagStretched);  to disable docking menu bar.




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