Print Page | Close Window

Skin and menu font problem, need help!

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=12890
Printed Date: 22 November 2024 at 11:31pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Skin and menu font problem, need help!
Posted By: hamvui2005
Subject: Skin and menu font problem, need help!
Date Posted: 10 December 2008 at 8:41pm
I changed menu font in a skin file. When I use the skin in CMainFrame::CMainFrame, the menu font is displayed correctly.
 
CMainFrame::CMainFrame()
{
 // TODO: add member initialization code here
 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();
 }
 
 m_strStylesPath = csStylesPath + _T(" file://\\Styles\\ - \\Styles\\ ");
 
 XTPSkinManager()->SetApplyOptions(xtpSkinApplyFrame | xtpSkinApplyColors | xtpSkinApplyMetrics);
 LoadSkin(1);
 
}
 
But when I change to other skin and changed back to this skin, menu font is not update (it is not display correctly)
I use LoadSkin and OnSkinChanged as SkinSDISample.
Please help me. Thanks very much.



Replies:
Posted By: Oleg
Date Posted: 11 December 2008 at 1:08am
Hi,

Try add
pCommandBars->GetPaintManager()->RefreshMetrics();


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


Posted By: hamvui2005
Date Posted: 11 December 2008 at 10:01pm

Thanks, but after changing the skin I called

void CMainFrame::OnSkinChanged()
{
 XTPPaintManager()->RefreshMetrics();

 OnSysColorChange();
 RedrawWindow(0, 0, RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE|RDW_ALLCHILDREN);  
 
 GetCommandBars()->GetPaintManager()->RefreshMetrics();

 GetCommandBars()->RedrawCommandBars(); 

}



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