Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Could skingFramework combine with RibbonBar?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Could skingFramework combine with RibbonBar?

 Post Reply Post Reply
Author
Message
iamthewind View Drop Down
Newbie
Newbie


Joined: 11 September 2007
Location: China
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote iamthewind Quote  Post ReplyReply Direct Link To This Post Topic: Could skingFramework combine with RibbonBar?
    Posted: 14 September 2007 at 5:25am

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

Back to Top
iamthewind View Drop Down
Newbie
Newbie


Joined: 11 September 2007
Location: China
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote iamthewind Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2007 at 5:28am

oh, I use RibbonBar in mainframe!

 
thanks!
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 15 September 2007 at 1:15am
Hello,
Don't call EnableFrameTheme and you will see Skinned frame.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
iamthewind View Drop Down
Newbie
Newbie


Joined: 11 September 2007
Location: China
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote iamthewind Quote  Post ReplyReply Direct Link To This Post 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("\\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!
 
 
Back to Top
iamthewind View Drop Down
Newbie
Newbie


Joined: 11 September 2007
Location: China
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote iamthewind Quote  Post ReplyReply Direct Link To This Post 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);
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.125 seconds.