Back to Contents        Previous        Next






5. Message files

FNwimp_initmessages(path$)
Reserves special blocks of memory and sets up a Message file ready for use.
Returns a message handle for file.
path$ = full pathname of messages file to use.
Gives ‘fatal’ error if messages file cannot be found.

FNwimp_reinitmessages(messagefilehandle%,path$)
If, after it has been initiated (with FNwimp_initmessages, above), a messages file is altered or a different messages file is now to be used, this function allows the changed/new file to be initiated in place of the previous file. Re-initiation can be carried out as many times as required.
Returns a message handle for the changed/new file - which may be different from the previous handle. (It would be normal to assign the return to the previous handle-variable - see Section 2.9)
messagefilehandle%= handle of previous messages file.
path$ = full pathname of new/changed messages file to use.
Gives ‘fatal’ error if messages file cannot be found.

FNwimp_getnumberofmessages(messagefilehandle%,token$)
Returns the number of items with the given token in the given message file.
messagefilehandle%= handle of messages file (returned from
FNwimp_initmessages/FNwimp_reinitmessages above).
token$=token of interest.



FNwimp_messlookup(messagefilehandle%,token$,a$,b$)
Returns the string in a messages file for the token token$, but any parameters ‘%0’ and ‘%1’ in the returned string are replaced with a$ and b$, respectively, before returning. (See Manual Section 2.9)
messagefilehandle%= handle of required messages file (returned from
FNwimp_initmessages/FNwimp_reinitmessages above).
Note that b$ is only used if a$ is not a null string i.e. if you only want 1 parameter to be substituted it must be a$ for %0.



FNwimp_createmessagemenu(messagefilehandle%,token$,title$,size%)
Creates a menu automatically from a Message file. Returns menu handle.
messagefilehandle%= handle of messages file to be used (as returned by
FNwimp_initmessages/FNwimp_reinitmessages).
token$ = token for menu. Eg: if token$=“MMenu” then the token “MMenuT” will specify the title, “MMenu1” the first item, “MMenu2” the second etc.
If title$=“” then the title defined in the message file will be used, otherwise title$ will override whatever is defined in the messages file.
If size%>number of items then the menu is dynamic, ie.
the items can subsequently be increased up to size%. (If size%=0 the menu will automatically be created to accomodate just the number of items contained in the messages file.)
(All menu text is created as indirected.)
(Also shown in Menu section.)



PROCwimp_recreatemessagemenu(menu%,messagefilehandle%,token$-,title$)
Rebuilds a menu from a Message file.
menu% = handle of menu to rebuild
messagefilehandle%= handle of messages file to be used (as returned by
FNwimp_initmessages/FNwimp_reinitmessages).
token$ = token for menu items. (See FNwimp_createmessagemenu() or Manual Section 2.18)
If title$=“” then the title defined in the message file will be used, otherwise title$ will override whatever is defined in the messages file.
(All menu text is created as indirected.)
(Also shown in Menu section.)






Top of page        Back to Contents        Previous        Next