Print Page | Close Window

Could skingFramework combine with RibbonBar?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=8002
Printed Date: 23 November 2024 at 12:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Could skingFramework combine with RibbonBar?
Posted By: iamthewind
Subject: Could skingFramework combine with RibbonBar?
Date Posted: 14 September 2007 at 5:25am

I noticed view in mainFrame can't render with skinFramework.




Replies:
Posted By: iamthewind
Date Posted: 14 September 2007 at 5:28am

oh, I use RibbonBar in mainframe!

 
thanks!


Posted By: Oleg
Date Posted: 15 September 2007 at 1:15am
Hello,
Don't call EnableFrameTheme and you will see Skinned frame.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: iamthewind
Date Posted: 15 September 2007 at 5:03am
Thanks very much!
But It still don't work.
 
I think I should post some of my codes.
 
I have a CToolBoxView, it is inherieted from CXTResizeFormView, and It hava some of UI Component as the following:
 
class CToolBoxView : public CXTResizeFormView
{
private:
 CXTTabCtrl m_tabControl;
 CXTListBox m_listControl;
 CXTListBox m_listNoticeBoard;  
 BOOL  m_bInited;
}
 
and I create this view at CMainFrame::OnCreateClient:
 
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
....
 if (!m_wndSplitter2.CreateView(0, 0, RUNTIME_CLASS(CToolBoxView), CSize(200, 0), pContext))
 {
  TRACE0("Failed to create CToolBoxView\n");
  return FALSE;
 }
...
}
 
 and CMainFrame create a RibbonBar just like sample SkinMDISample CreateRibbonBar():
 
OKay, Now I call this function:
 
void CMainFrame::OnFileOpen()
{
 TCHAR szStylesPath[_MAX_PATH];
 VERIFY(::GetModuleFileName(
  AfxGetApp()->m_hInstance, szStylesPath, _MAX_PATH));
 CString csStylesPath(szStylesPath);
 int nIndex  = csStylesPath.ReverseFind(_T('\\'));
 if (nIndex > 0) {
  csStylesPath = csStylesPath.Left(nIndex);
 }
 else {
  csStylesPath.Empty();
 }
 csStylesPath += _T(" file://\\Styles\\ - \\Styles\\ ");
 XTPSkinManager()->LoadSkin(csStylesPath + _T("iTunes"), _T("Normalitunes.INI"));
 XTPPaintManager()->RefreshMetrics();
 OnSysColorChange();
 RedrawWindow(0, 0, RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE|RDW_ALLCHILDREN); 
 m_wndStatusBar.Invalidate();
 GetCommandBars()->GetPaintManager()->RefreshMetrics();
 GetCommandBars()->RedrawCommandBars(); 
}
 
I wish the upper code would change the CToolBoxView's skin in CMainFrame, but it still don't works.
 
Thanks again, Oleg!
 
 


Posted By: iamthewind
Date Posted: 16 September 2007 at 2:30am

I know how to do it! haha

It works after I call ApplyWindow:
XTPSkinManager()->ApplyWindow(m_wndSplitter2.GetPane(0,0)->m_hWnd);



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net