Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to set the control ID to the Toolbar?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to set the control ID to the Toolbar?

 Post Reply Post Reply
Author
Message
Makarand View Drop Down
Senior Member
Senior Member
Avatar

Joined: 27 February 2007
Location: India
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote Makarand Quote  Post ReplyReply Direct Link To This Post Topic: How to set the control ID to the Toolbar?
    Posted: 28 September 2007 at 5:53am

BOOL CreateToolBar(
    DWORD dwStyle, 
CWnd* pParentWnd,
UINT nID = AFX_IDW_TOOLBAR
);
dwStyle         : Styles for the toolbars.
pParentWnd  : Specifies the parent window of the TaskPanel control.
nID                :Specifies the Toolbar control ID.

As per my current implementation I have created toolbar using command bar.
m_wndtToolBar = (CXTPToolBar *) pCommandBars->Add(_T(g_cmcagent), xtpBarTop);
if (!m_wndAgentToolBar || !m_wndAgentToolBar->LoadToolBar(IDR_TOOLBAR))
{
TRACE0("Failed to create toolbar\n");
return -1;
}
How do I set the  control ID to the Toolbar?

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: 28 September 2007 at 6:01am
Hi,
m_wndAgentToolBar->SetBarID(Id).
 
if you use LoadToolbar id will be set to IDR_TOOLBAR automatically.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.