Page 1 of 1

How can I call a procedure which is present in the Win32.lib?

Posted: 27 Oct 2014 10:36
by Ferenc Nagy
I want to display a menu of only the

Code: Select all

 monospace
fonts.[/b]
The integer division by 8 of the byte#27 of their LOGFONT structure classify the fonts.

Code: Select all

      fontClass()=fontClassAux(PitchAndFamily,PitchAndFamily div 8) :-          F=selectedFont,          PitchAndFamily=binary::getIndexed_unsigned8(F,27),          succeed().    fontClassAux(_,1)=monospace :-          !.     fontClassAux(_,6)=monospace :-          !.     fontClassAux(_,_)=proportional.
I have found an example written in C which uses in http://www.cplusplus.com/forum/windows/74209/
EnumFontFamiliesEx
to cycle over the installed fonts and requires an user callback function to do the filtering as above.

Great! That procedure is present in the Win32.lib of my VIP 7.5 PE.
The problems are:
- How can a call it from a Prolog main program?
- In general, if I read a manual page in MSDN like http://msdn.microsoft.com/en-us/library ... 85%29.aspx, what are the counterparts of the variable types among the Prolog domains?