Displays an HTML page in the browser.
returnCode = wcMessagePage(cntrlHandle, "Result", "Result: %s", val);
int wcMessagePage(void *controlHandle, char *title, char *format, valueToPrint[, valueToPrint]...)
controlHandle | The handle to the control structure. |
title | Value to appear in the <TITLE> tag of the output HTML page. |
format | A formatting string that specifies how to convert and print the output. Syntax is identical with that used in the C printf( ) function. |
valueToPrint | The value to be printed in the message, typically a variable. |
0 | Success. |
Error code | Failure or exception. For a list of possible error codes, see Error Messages. |
The following code shows how wcMessagePage( ) is used in an application.
int main(argc, argv) int argc; char **argv; { void *wcp; int ret; char *MiVal; ... if((ret = wcInit(argc, argv, &wcp)) < 0) return wcTraceErr(wcp, ret); ... while(1) { if((ret = wcConOpen(wcp, 0)) < 0) return wcTraceErr(wcp, ret); wcGetVariable(wcp, "MiVal"); /* Perform some calculation on MiVal */ ... wcMessagePage(wcp, "Result", "The value of MiVal is <B>%s</B>", MiVal); ... if((ret = wcConClose(wcp)) < 0) return wcTraceErr(wcp, ret); } return wcExit(wcp); }