Cicode Programming Reference > Cicode Function Categories > Page Functions Introduction > PageTask


PageTask() is used for running preliminary Cicode before displaying a page in a window. It makes it possible for the same Cicode to be run if the page is re-entered by navigating forward or back. PageTask() is similar to TaskNew().

PageTask() returns a handle to a code task the first time it is run. The custom Cicode of the sFunctionName parameter needs to call PageDisplay() in order to display the page. When the page changes, the function and its parameters will be pushed onto the Page History stack. The Cicode fnTask will be called again when the page is navigated to using the PageForward or PageBackward functions.


PageTask(iWinNum, sFunctionName, sFunctionArg)


The Window number of the window in which to display the page.


String representing the Cicode function to run each time the page is navigated to using the forward and backward navigation functions.


String representing the parameters to use with function fnTask.

Return Value

A handle to a code task the first time it is run. BAD_HANDLE (-1) if the function did not complete.

Related Functions

PageBack, PageForward


FUNCTION MyTrendDisplay(INT Area)

See Also

Page Functions