Fonts in CRichEditCtrl
-
I have a class derived from CRichEditCtrl, and am attempting to set its default font by filling CHARFORMAT's yHeight and calling CRichEditCtrl::SetDefaultCharFormat, but I can't seem to find an actual way to convert my value (which is in points) to the value it needs ("twips", apparently) to match the size of the font when used in other areas of my client screen (multiplying the pts value by ten causes it to be around the same size, but it seems bold, for example). Can anybody pass down a little wisdom on this idea? I'm at somewhat of an impasse in that branch of my project. Thanks. - Jason (SonorkID 100.611) The Code Project - Orange makes the art grow fonder
-
I have a class derived from CRichEditCtrl, and am attempting to set its default font by filling CHARFORMAT's yHeight and calling CRichEditCtrl::SetDefaultCharFormat, but I can't seem to find an actual way to convert my value (which is in points) to the value it needs ("twips", apparently) to match the size of the font when used in other areas of my client screen (multiplying the pts value by ten causes it to be around the same size, but it seems bold, for example). Can anybody pass down a little wisdom on this idea? I'm at somewhat of an impasse in that branch of my project. Thanks. - Jason (SonorkID 100.611) The Code Project - Orange makes the art grow fonder
-
I have a class derived from CRichEditCtrl, and am attempting to set its default font by filling CHARFORMAT's yHeight and calling CRichEditCtrl::SetDefaultCharFormat, but I can't seem to find an actual way to convert my value (which is in points) to the value it needs ("twips", apparently) to match the size of the font when used in other areas of my client screen (multiplying the pts value by ten causes it to be around the same size, but it seems bold, for example). Can anybody pass down a little wisdom on this idea? I'm at somewhat of an impasse in that branch of my project. Thanks. - Jason (SonorkID 100.611) The Code Project - Orange makes the art grow fonder
From the
CHARFORMAT
docs -yHeight
Character height, in twips (1/1440 of an inch or 1/20 of a printer's point).
So 20 twips == 1 point. --Mike-- The Internet is a place where absolutely nothing happens. -- Strong Bad 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm
-
From the
CHARFORMAT
docs -yHeight
Character height, in twips (1/1440 of an inch or 1/20 of a printer's point).
So 20 twips == 1 point. --Mike-- The Internet is a place where absolutely nothing happens. -- Strong Bad 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm
I tried yours and Moak's suggestions, but the text is still in bold. Any further ideas? Thanks for helping, and especially for taking the time to go and dig that up from the MSDN. - Jason (SonorkID 100.611) The Code Project - Orange makes the art grow fonder
-
From the
CHARFORMAT
docs -yHeight
Character height, in twips (1/1440 of an inch or 1/20 of a printer's point).
So 20 twips == 1 point. --Mike-- The Internet is a place where absolutely nothing happens. -- Strong Bad 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm
Nevermind, thanks.. got it :) - Jason (SonorkID 100.611) The Code Project - Orange makes the art grow fonder