Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Font error of ribbon bar when install Office 2007
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Font error of ribbon bar when install Office 2007

 Post Reply Post Reply
Author
Message
nttrungmt View Drop Down
Newbie
Newbie
Avatar

Joined: 15 September 2008
Location: Vietnam
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote nttrungmt Quote  Post ReplyReply Direct Link To This Post Topic: Font error of ribbon bar when install Office 2007
    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


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 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
Back to Top
nttrungmt View Drop Down
Newbie
Newbie
Avatar

Joined: 15 September 2008
Location: Vietnam
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote nttrungmt Quote  Post ReplyReply Direct Link To This Post 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.
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: 18 September 2008 at 1:47am
Sorry, just add
 
CWindowDC dc(NULL);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.109 seconds.