Listing Screen and Control Information
Use
There are two functions for creating a report that lists information about the screen that is associated with the current event:
Function |
Description |
ItEv_DumpEvent |
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 |
It_ListControls |
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).
Procedure
Example
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;
}