Appendices > Using Rogue Wave Server on Windows > Controlling Rogue Wave Server Error and Trace Messages > Displaying Text Messages
 
Displaying Text Messages
The output of text messages is controlled by the global function IlsInit.
This function has the following signature:
enum IlsWindowType {
ILS_WINDOWTYPE_CONSOLE,
ILS_WINDOWTYPE_WINDOW,
ILS_WINDOWTYPE_DEFAULT,
ILS_WINDOWTYPE_POP
};
 
void
IlsInit(const char* titleName,
const char* = 0, // not used
IlsWindowType windowType);
The argument titleName gives a title to the text window if such a window has been created. The window type is used to control whether a text window has been created or not and to manage its behavior.
*ILS_WINDOWTYPE_CONSOLE—This is the default window type if the application has been compiled with the option /D _CONSOLE. When you use this option, no text window is created, and all output is written to file descriptor 2.
*ILS_WINDOWTYPE_WINDOW—This is the default window type if the application has not been compiled with the option /D _CONSOLE. When you use this option, a separate text window is created to display the messages. This window appears on the screen only when there is output to display. When the text window appears, the window menu includes a Close menu item which can be used to close the window and destroy the text window. Once the text window has been destroyed, all further trace messages are lost. It is possible to remove the Close menu item at start-up by defining the environment variable set ILS_CS_NOCLOSE=yes. In this case, the text window can be minimized and maximized but it cannot be destroyed. The text window also allows the text to be cleared or to be logged to a file, and the application exits.
These actions are accessed via control keys:
*Ctrl-Q: This key sequence causes a pop-up dialog box to appear. This dialog box asks whether the user wants to quit the application or not. If the user confirms the action, the application exits.
*Ctrl-R: This key sequence causes a pop-up dialog box to appear that asks whether or not to reset the trace messages. If the user confirms the action, then the text is cleared and the text window is reset to its initial state.
*Ctrl-S: This key sequence causes a pop-up menu to appear that asks the user to choose a file to save the trace information. Clicking Ok will cause the trace messages to be written out to the selected file.
There is no limitation on the amount of text that can be written to the text window.
*ILS_WINDOWTYPE_DEFAULT—This window type is the default value if the global function IlsInit is not called by your application. It is used to decide at runtime whether a separate text window should be created (ILS_WINDOWTYPE_WINDOW) or whether the output should be directed to the console (ILS_WINDOWTYPE_CONSOLE).
*If the IlsInit class is called by your application, the application will write to the console if ILB_FORCE_CONSOLE is set. Otherwise, a separate text window is created.
Note: If the application is created as a console application, it can have a separate text window for its trace messages.
*ILS_WINDOWTYPE_POP—This window type is a variation of the ILS_WINDOWTYPE_WINDOW. The only difference with this window is that it has a pop-up mode that is controlled by the Close window menu. When the command Close is used on this type of window, the text window is completely hidden but not destroyed. There is no icon, and there is no means to make the window visible again.
However, if more output is written to the window, the window pops up and becomes visible again. This window can be minimized and maximized, like any other window, via the window menu.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.