Silverfrost Logo About Us | Contact Us
 

Icon - %ic[icon_name]

This format supplies the name of an icon resource (as a standard character string). It is drawn at the current position in the format window.

For example:

WINAPP 0,0,'d28.rc'
INCLUDE <windows.ins>
i=winio@('This is an icon: %ic[win_icon]')
END

In a separate file called d28.rc we have:

win_icon ICON window.ico

The caret (^) character is used to attach a call-back function to an icon. The function is called each time the user clicks on the icon.

Icons differ in one respect from bitmaps in that they may have transparent regions that make the image appear to sit on the background in the same way that text does.

If a grave accent (`) is used, the icon is supplied via an icon handle. A suitable handle is returned by make_icon@ (see make_icon@) or by the Windows API function LoadIcon. If you want to use LoadIcon to access one of the pre-defined icons then you will need to create your own binding to LoadIcon. For example:

STDCALL MyLoadIcon 'LoadIconA' (val,val):INTEGER
INTEGER h_icon
h_icon=MyLoadIcon(NULL,IDI_QUESTION)
i=winio@('%`ic',h_icon)

 

 

Copyright © 1999-2017 Silverfrost Limited