CHeroesView in shortcutbar pane
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Shortcut Bar
Forum Description: Topics Related to Codejock Shortcut Bar
URL: http://forum.codejock.com/forum_posts.asp?TID=9349
Printed Date: 30 January 2025 at 1:01pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: CHeroesView in shortcutbar pane
Posted By: alistair.m
Subject: CHeroesView in shortcutbar pane
Date 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
|
Replies:
Posted By: alistair.m
Date 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; }
|
|