Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Shortcut Bar
  New Posts New Posts RSS Feed - CHeroesView in shortcutbar pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CHeroesView in shortcutbar pane

 Post Reply Post Reply
Author
Message
alistair.m View Drop Down
Groupie
Groupie


Joined: 14 January 2008
Location: United Kingdom
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote alistair.m Quote  Post ReplyReply Direct Link To This Post Topic: CHeroesView in shortcutbar pane
    Posted: 18 January 2008 at 12:40pm
I'm trying to add to one of my shortcutbar panes, a view like the CHeroesView class in the samples\toolkitpro\advanced project that has a toolbar and a listview. That example attaches it to a docking pane, but I can't find the way to add it to the CXTPShortcutBarPane derived class in my shortcutbar. I can get to the point of creating the view (in the CXTPShortcutBarPane::Create), but there doesnt seem to be an Attach method like the one used in the example. If I don't attach, it just shows an empty pane.

How can this be done?
Thanks
Al


Back to Top
alistair.m View Drop Down
Groupie
Groupie


Joined: 14 January 2008
Location: United Kingdom
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote alistair.m Quote  Post ReplyReply Direct Link To This Post Posted: 21 January 2008 at 6:56am
Aha! simple really.
Sorted. I now have a shortcut pane with an embedded toolbar and a icon list view just like the heroes view example. Now I just need to tie up the menu events...

//.h
    CWnd* m_pProfileView;
    ...

//.cpp
BOOL CShortcutPaneMyProfile::Create(LPCTSTR lpszCaption, CXTPShortcutBar* pParent)
{
    if (m_pProfileView == 0)
    {
        m_pProfileView = new  CShortcutProfilePaneView();
        m_pProfileView->Create(_T("STATIC"), NULL, WS_CHILD, CRect(0, 0, 0, 0), this, 0);
        ((CShortcutProfilePaneView*)m_pProfileView)->OnInitialUpdate();
        AddItem("Profile", m_pProfileView, 200);
        m_pProfileView->ShowWindow(SW_SHOW);
    }
    return TRUE;
}

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.