#resource directive and fonts - page 2

 

Is this still the only way to include a font as resource? (when I want to use it in 'standard text objects' and not in canvas/bitmap objects)

@el_looto I'm getting these errors...


errors

 
Jagg:

Is this still the only way to include a font as resource? (when I want to use it in 'standard text objects' and not in canvas/bitmap objects)

@el_looto I'm getting these errors...


youre getting the errors because what I wrote was not intended to be used as-is by cut and paste coders.

includes go with your include declarations, defines with your definition declarations

variables are declared within functions, as is the AddFontResource call.

the key error line is the one that says "expressions are not allowed on a global scope". You cant just call a function from there. Its basic C++ syntax and structure thats your problem in this case.

 
#include <WinAPI\fileapi.mqh>

This is for MT5, correct?

Can we use AddFontResourceExW() in MT4 also?