Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Toolbar Tooltip Style
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Toolbar Tooltip Style

 Post Reply Post Reply
Author
Message
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Topic: Toolbar Tooltip Style
    Posted: 06 January 2008 at 10:41am
Hi,
 
I have a CXTPToolBar toolbar created as a child of a CWnd.
 
How do I change the tooltip style to show title and description in balloon style? I guess this is a basic MFC question but I really can't think how to do this.
 
Many thanks,
 
Simon the stupid programmer
Simon HB9DRV
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: 06 January 2008 at 2:23pm
Hi,
You need connect it to some CXTPCommandBars object. Serch SetCommandBars in forum.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2008 at 1:05pm
Originally posted by oleg oleg wrote:

Hi,
You need connect it to some CXTPCommandBars object. Serch SetCommandBars in forum.
 
Sorry Oleg, I only just saw your reply. Could I use the CommandBars in my CMDIChildWnd? I'll try now and report back.
Simon HB9DRV
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2008 at 1:14pm
Originally posted by Simon HB9DRV Simon HB9DRV wrote:

Originally posted by oleg oleg wrote:

Hi,
You need connect it to some CXTPCommandBars object. Serch SetCommandBars in forum.
 
Sorry Oleg, I only just saw your reply. Could I use the CommandBars in my CMDIChildWnd? I'll try now and report back.
 
I can't. My class is derrived from CWnd - is there a solution at all for this, for example a Jock class derrived from CWnd with CommandBars() ?
 
I can live without it but it would be very nice...
Simon HB9DRV
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2008 at 6:05pm
Hello Simon;
 
I did it this way and it works very well:
 
class CBatchInfoContainer : public CWnd
{
public:
 CBatchInfoContainer();
 virtual ~CBatchInfoContainer();
 bool Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
private:
 CXTPCommandBars*               pCmdBars_;
 int  OnCreate(LPCREATESTRUCT lpCreateStruct);
 DECLARE_MESSAGE_MAP()
};
-------------------------------------------------------------------------------------------
 
CBatchInfoContainer::CBatchInfoContainer()
try : pCmdBars_(CXTPCommandBars::CreateCommandBars())
{
}
catch (const std::bad_alloc&) {
};
CBatchInfoContainer::~CBatchInfoContainer() {
 pCmdBars_->InternalRelease();
}

BEGIN_MESSAGE_MAP(CBatchInfoContainer, CWnd)
 ON_WM_CREATE()
END_MESSAGE_MAP()

int CBatchInfoContainer::OnCreate(LPCREATESTRUCT lpcs) {
 if (CWnd::OnCreate(lpcs)!=0)
  return -1;
 pCmdBars_->GetToolTipContext()->SetStyle(xtpToolTipOffice2007);
 pCmdBars_->SetSite(this);
 pCmdBars_->EnableCustomization(FALSE);
 pCmdBars_->EnableDocking();
// Create ToolBar
 CXTPToolBar* pToolBar = (CXTPToolBar*)pCmdBars_->Add(_T("BatchInfoToolbar"), xtpBarBottom);
 if (!pToolBar || !pToolBar->LoadToolBar(IDR_TOOLBAR_BATCHINFO))
 {
  TRACE0("Failed to create toolbar\n");
  return -1;
 }
 pToolBar->SetShowGripper(FALSE);
 pToolBar->ShowExpandButton(FALSE);
 pToolBar->EnableDocking(xtpFlagAlignBottom|xtpFlagStretched);
 return 0;
}
 
Hope this helps.
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2008 at 1:51am
Thanks - I'll try it today.
Simon HB9DRV
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2008 at 4:35am
Originally posted by Simon HB9DRV Simon HB9DRV wrote:

Thanks - I'll try it today.
 
Excellent - have 100 hero points :-)
Simon HB9DRV
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.219 seconds.