Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Problem with resources in addtional view! Collapse All
Subject Author Date
Fietiger Kisinger Dec 2, 2008 - 6:25 PM

As you know, I am developing a SDI application with multiple views.One of my views is CExtTreeView,wich is created in CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)  just to transmitthe current CCreateContext pointer to it,otherwise when the view is avtived ,some commands which manipulate the current doc will give no response.The view has a toolbar at the top just like GLViews sample.But the problem is the toolbar did not display the ICONs of the commands.And the difference is  In the  GLViews  sample all of childview is created in CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) and here the view is created in OnCreateClient with m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CExtTreeView),  CSize(rc.Width()/6, rc.Height()),pContext) where  m_wndSplitter is an CExtSplitterWnd object of CMainframe.So what could I do to solve such problem?Did not the resources of the toolbar be loaded?

Technical Support Dec 3, 2008 - 10:01 AM

The CExtToolControlBar control does not contain icons of its buttons. The icons are stored in the command manager. So, if you updated the command manager from all the toolbar resources using the CExtCmdManager::UpdateFromToolBar() method, then toolbar icons should be displayed OK. The CExtToolControlBar::LoadToolBar() method updates the command manager from loaded toolbar resource automatically. If you have initialized CExtToolControlBar control using other methods (CExtToolControlBar::InsertButton(), CExtToolControlBar::InsertSpecButton(), CExtToolControlBar::SetButtons() etc.) then you should check whether all the command identifiers of inserted buttons are registered in the command manager. You can register command identifiers using the CExtCmdManager::CmdAllocPtr() method and assign icons to them using any of the CExtCmdManager::CmdSetIcon() overloaded methods.