![]() |
Loading Designer CommandBars from DLLs |
Post Reply ![]() |
Author | |
voripteth ![]() Newbie ![]() ![]() Joined: 24 March 2009 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() Posted: 24 March 2009 at 5:45pm |
My app loads some of it's menus and toolbars from DLLs. How do I load Designer created elements (CommandBars and Menus) from various DLL locations?
I looked at your Scribble example but it seems to load the entire UI from a DLL. My app needs to add elements to an exisitng UI. This would include inserting CommandBars to specific positions in the existing UI. Thanks for your help! |
|
Product: ToolkitPro (MFC) v13.0.0
Platform: Windows XP(32bit)-SP 3 Language: VC++ 2008 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
With designer file you can load only whole commandbars.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Smucker ![]() Senior Member ![]() ![]() Joined: 02 February 2008 Status: Offline Points: 156 |
![]() ![]() ![]() ![]() ![]() |
You can copy toolbars around between loaded commandbars, though.
I had a similar issue: I wanted to use one designer file and share icons and commands between the command bar and some toolbars located elsewhere, so maybe this will help you: Adds a toolbar from a designer-loadded commandbar to a CWnd-derived object (CTreePane). Error handling omitted for clarity void CTreePane::OnSize(UINT nType, int cx, int cy) { CWnd::OnSize(nType, cx, cy); if (!m_toolscopied) { CMainFrame *pframe = (CMainFrame *)AfxGetMainWnd(); CXTPCommandBars *pcmdbars = pframe->GetCommandBars(); CXTPToolBar *ptbar = pcmdbars->GetToolBar(TBR_TREE); CXTPControls *pcontrols = ptbar->GetControls()->Duplicate(TRUE); m_toolbar.SetControls(pcontrols); m_toolscopied = TRUE; m_toolbar.EnableDocking(xtpFlagAlignTop|xtpFlagHideWrap|xtpFlagStretched); } //... |
|
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit) Language: Visual C++ 9.0 (Studio 2008) |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |