![]()  | 
 
Skin and menu font problem, need help! | 
 
    Post Reply  
   | 
  
| Author | |
   
   hamvui2005  
   
   Newbie  
   Joined: 10 December 2008 Status: Offline Points: 3  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Skin and menu font problem, need help!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("\\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. 
    | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 11 December 2008 at 1:08am | 
 
| 
   
    
   Hi,
 
   
  Try add pCommandBars->GetPaintManager()->RefreshMetrics(); 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   hamvui2005  
   
   Newbie  
   Joined: 10 December 2008 Status: Offline Points: 3  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 11 December 2008 at 10:01pm | 
 
| 
   
    Thanks, but after changing the skin I called void CMainFrame::OnSkinChanged()  OnSysColorChange(); GetCommandBars()->RedrawCommandBars(); } 
    | 
 |
![]()  | 
 |
    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  |