Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Customization and Embedded Controls
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Customization and Embedded Controls

 Post Reply Post Reply
Author
Message
erichf View Drop Down
Newbie
Newbie


Joined: 19 August 2003
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote erichf Quote  Post ReplyReply Direct Link To This Post Topic: Customization and Embedded Controls
    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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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);

Back to Top
erichf View Drop Down
Newbie
Newbie


Joined: 19 August 2003
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote erichf Quote  Post ReplyReply Direct Link To This Post 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

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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.

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.156 seconds.