On Using EM_SETCHARFORMAT and GetCharABCWidths with courier new
-
Hi I am used to figuring character formatting from the mainframe world where everything is a byte, towards that and I would like to use courier new in my rich edit. can I use
EM_SETCHARFORMAT
setting courier new of course I would probably have to use CClientDC to get the device context of the rich edit and then GetCharABCWidths Does this make any sense ?
-
Hi I am used to figuring character formatting from the mainframe world where everything is a byte, towards that and I would like to use courier new in my rich edit. can I use
EM_SETCHARFORMAT
setting courier new of course I would probably have to use CClientDC to get the device context of the rich edit and then GetCharABCWidths Does this make any sense ?
ForNow wrote:
Does this make any sense ?
Not really. Everything on a PC is also a byte (or a word ...). The only time the format of a character has any real relevance is when you display it on some output device. So when writing to your device context, you must first create a font and select it into the DC. See https://msdn.microsoft.com/en-us/library/w6196kz3.aspx[^] for some more details. See also http://www.functionx.com/win32/Lesson15.htm[^] for a sample using Win32, but you should be able to get enough information to use that in MFC.