PDA

View Full Version : Issues with Changestandardstyle when the Font selected is Cambria Math Font



Avis
04-09-2010, 07:49 AM
Hi All,

I am using an activex with objective grid. I have some user customizable settings for fonts where user can select any kind of Fonts. To change the font I normally call Changestandardstyle() which is a grid function where I pass my LOGFONT as a parameter.

m_cBOBHeaderView->ChangeStandardStyle(CGXStyle().SetFont(l_cFontHead er));

If user select the Font as Cambria Math and size as >170 lets say 199 then my control crashes at Changestandardstyle() with an exception as "Divide By zero".

One thing I noticed is in Cambria Math even if the text height is very less the Row width is pretty much bigger than the font height. In my case I have atleast 3 to 4 views where this font changes simultaniously.

If I change the font size to 199 for any other fonts my control works fine without any crash.

Kindly request you all to please provide some inouts on this as I am facing this problem since long.

Thanks in advance
Avis

go4kris
10-19-2011, 09:22 AM
Hii.

i am also facing the same divide by zero crash in the same senario. Did anyone else face this issue and has a solution?
i am using the following code and it crashes.
m_cTempView->ChangeStandardStyle(CGXStyle().SetFont(l_cFontTemp ));
Should anyother function apart from ChangeStandardStyle has to be used or the l_cFontTemp has to be initializes with any variables for this special Math font.

plz help.

regards,
kris.

hkim6
10-20-2011, 11:29 AM
Some time back i handled the fonts in Cambria Math and now i can't get the right code, please rescue.

faarizamar
01-11-2015, 11:08 PM
What is the deal with slx.exe used to "compile" secdbcode.cpp? Is the CPP encrypted?? Why?!