Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CFormView and CXTPToolBar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CFormView and CXTPToolBar

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


Joined: 03 December 2003
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesC Quote  Post ReplyReply Direct Link To This Post Topic: CFormView and CXTPToolBar
    Posted: 18 December 2003 at 2:50pm
I have a CFormView with a Toolbar on it. I create it fine, but one of the buttons is supposed to be a ControlSplitButtonPopup. My Code looks like this:

VERIFY(m_wndToolBar.CreateToolBar(WS_VISIBLE|WS_CHILD|CBRS_T OOLTIPS, this, AFX_IDW_TOOLBAR)); //|CBRS_GRIPPER

VERIFY(m_wndToolBar.LoadToolBar(IDR_MY_TOOLBAR));

m_wndToolBar.SetFlags(xtpFlagAlignAny|xtpFlagFloating|xtpFla gStretched);//(xtpFlagStretched);

//More Options for Add

CXTPControl* pControl = m_wndToolBar.GetControls()->FindControl(xtpControlButton, ID_MY_TOOLBAR_ADD, TRUE, FALSE);

m_wndToolBar.GetControls()->SetControlType(pControl, xtpControlSplitButtonPopup);

I have a Menu with the same ID has the button 'ID_MY_TOOLBAR_ADD' but when I click on the arrow (which DOES show up next to the button that I want the arrow to be with), there is no menu. Am I missing a step. Normally it seems that this is all done in OnCreateControl but I dont get that message since I am only a CFormView. Any Ideas? Thanks

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: 25 December 2003 at 12:48am

Try this:

 CXTPControl* pControl = m_wndToolBar.GetControls()->Add(xtpControlSplitButtonPopu p, ID_MY_TOOLBAR_ADD, _T(""), 0);

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