Discussions related to Visual Prolog
User avatar
Ferenc Nagy
VIP Member
Posts: 215
Joined: 24 Apr 2007 12:26

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

Unread post by Ferenc Nagy »

I want to display a menu of only the

Code: Select all

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/
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?
TIA, Regards,
Frank Nagy
Post Reply