Could skingFramework combine with RibbonBar? |
Post Reply |
Author | |
iamthewind
Newbie Joined: 11 September 2007 Location: China Status: Offline Points: 22 |
Post Options
Thanks(0)
Posted: 14 September 2007 at 5:25am |
I noticed view in mainFrame can't render with skinFramework. |
|
iamthewind
Newbie Joined: 11 September 2007 Location: China Status: Offline Points: 22 |
Post Options
Thanks(0)
|
oh, I use RibbonBar in mainframe! thanks!
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Don't call EnableFrameTheme and you will see Skinned frame.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
iamthewind
Newbie Joined: 11 September 2007 Location: China Status: Offline Points: 22 |
Post Options
Thanks(0)
|
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!
|
|
iamthewind
Newbie Joined: 11 September 2007 Location: China Status: Offline Points: 22 |
Post Options
Thanks(0)
|
I know how to do it! haha It works after I call ApplyWindow: XTPSkinManager()->ApplyWindow(m_wndSplitter2.GetPane(0,0)->m_hWnd); |
|
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 |