Print Page | Close Window

Font error of ribbon bar when install Office 2007

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=12153
Printed Date: 28 February 2025 at 6:43pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Font error of ribbon bar when install Office 2007
Posted By: nttrungmt
Subject: Font error of ribbon bar when install Office 2007
Date Posted: 15 September 2008 at 4:20am
My application use office 2007 style ribbon bar .
The ribbon bar display japanese character correctly until i installed office 2007. The screen appeared like this:



My app is built in mode multi-byte character set. I think maybe problem here because i have another Unicode app display well in same environment.

How i can fix this problem without changing build mode from multi-byte to unicode?

Please help me





Replies:
Posted By: Oleg
Date Posted: 15 September 2008 at 5:51am
Hello,
 
we had same complain. After Office2007 installed in Japanese OS Menu font start use wrong charset. :(
 
Solution is to patch void CXTPRibbonTheme::UpdateFonts() method and replace
 
 lf.lfCharSet = ncm.lfMenuFont.lfCharSet;
to
 lf.lfCharSet = (BYTE)::GetTextCharsetInfo(dc, NULL, 0);


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


Posted By: nttrungmt
Date Posted: 17 September 2008 at 5:44am
I have patched CXTPRibbonTheme::UpdateFonts() method follow your intructions but when i build codejock again, there is an error
The compiler said that dc is not declared.

In (BYTE)::GetTextCharsetInfo(dc, NULL, 0);
I can't found dc variable is declared anywhere.
Please help me check this line of code.


Posted By: Oleg
Date Posted: 18 September 2008 at 1:47am
Sorry, just add
 
CWindowDC dc(NULL);


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



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