I want to make a combo box with all of the computer's installed fonts enumerated in it. I'm not sure how this is done. Do I need to access the registry to get this? Thanks
You should use the Win32 API function EnumFontFamiliesEx. You call that function, passing a callback function matching the type of EnumFontFamExProc. The callback function is called once for every font found by EnumFontFamiliesEx.
I'd recommend using the unicode version (EnumFontFamiliesExW), as I've seen the ascii version (EnumFontFamiliesExA) display some very weird behaviour for East Asian language fonts.
The linked articles have example code.
The winapi way of doing it is using EnumFontFamiliesEx
function. You should pass a filled structure with default param DEFAULT_CHARSET
to list all installed fonts.
See MSDN to get more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With