Listing Screen and Control Information 


There are two functions for creating a report that lists information about the screen that is associated with the current event:




Lists information on all the items in the event. This includes information on the screen, its menu, its toolbar buttons, and all the controls on the screen


Lists information on all the controls that are on the screen, which is associated with the event.

Note that both functions list the same information on the controls that are on the screen. However, the It_ListControl function lists a subset of the information that the ItEv_DumpEvent lists.

For the controls on the screen the two functions list five attributes of each of the controls:

Both of these functions allow you to either print the information or to display the information on the standard output device (most likely the screen).


  1. Write a C function to specify the format of the report for listing the screen or the control information.
  2. Call It_SetDumpHook to point to this C function (the report format specification function).
  3. Call the It_ListControls or the ItEv_DumpEvent function to create the report.


The following is a sample print function to be used later by the It_ListControls function:

int putt(char *ptr)


return printf("%s", ptr);


The following example prints the information on the controls:

int putt(char*);

/* provide the print function to be used when It_ListControls is called */

if (It_SetDumpHook(hndl, putt) == FALSE)


printf(" SetDumpHook Error while SetDumpHook!-- It_SetDumpHook\n");

// Handle error case;


/* print out the list of controls. This calls putt to print the controls */

if (It_ListControls(hndl) == FALSE)


printf(" List control error. Program aborted!\n");

// Handle error case;