Print Page | Close Window

How to set the control ID to the Toolbar?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=8209
Printed Date: 23 April 2025 at 10:53am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to set the control ID to the Toolbar?
Posted By: Makarand
Subject: How to set the control ID to the Toolbar?
Date 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?




Replies:
Posted By: Oleg
Date 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



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