System Colors HandlingWritten by Jose A. Becerril The example:
What you can experiment: (in colores.pro)
resolve
getSysColor externally ,
setSysColors externally
showColour([H|T]):-
H=pair(Item,Colour),
Punto = memory::allocHeap(sizeOfDomain(binary)),
BI = uncheckedConvert(binary, Punto),
binary::setIndexed_integer32(BI, 0,Item),
Value= uncheckedConvert( core::integer32, BI ),
% ......................................................................................
Punto2 = memory::allocHeap(sizeOfDomain(binary)),
BI2 = uncheckedConvert(binary, Punto2),
binary::setIndexed_integer32(BI2, 0,Colour),
Value2 = uncheckedConvert( core::integer32, BI2 ),
setSysColors(1,Value,Value2)=TOK,
TOK<>0,
showColour(T),!.
clauses
onUpdate(Rectangle) = defaultHandling():-
vpi::winClear( thisWin,Rectangle,0xFF80FF),!.
storing_Colour: colores::pairList:=[]. NoteThe example requires Visual Prolog 7.3 Commercial or Personal Edition. Users of previous versions of Visual Prolog are welcome to upgrade to the current version of Visual Prolog to use the latest versions of the Visual Prolog examples. Use the WEB|Check for Update IDE menu command for upgrade information.
|