Hello guys,
I searched a lot to find a way to get the size of a text (both width and height) of a text. Found some posts, mostly pointing to the of_getTextSize on PFC, or the GetTextExtentPoint32A (which is used by of_getTextSize).
The difficulty I'm having is that the Height is always returning 16, independent of the font size I use. Seems like 16, converted to PBUnits gives me the correct height to a size 8 Arial or so. Can you help me figure it out? I'm on a Windows 7 SP1 32bit machine.
Also I'm trying to get a list of fonts from Windows. I tried using the ChooseFont from comdlg32.dll, but the font list is different from the one PB shows. The same is true if I use "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts".
I found what seems to be the correct list at "HKCU\Software\Microsoft\Shared Tools\Panose", this seems to be the same font list PB uses (for the dropDown on static text and so), but what the heck is this Panose thing? Do you know if this is right way to go?
So that you know, I'm creating a dynamic DW where the user can format the font face, size, etc.
I've attached a piece of my test case.
Thanks a lot
Daniel