Locale Info LW Object Info Globals Table of Contents

"Info Messages"

Availability:  LightWave 4.0 - 6.0, Inspire 1.0
Component:  Layout, Modeler

This global provides a set of functions for displaying messages to the user.

Global Call

   LWMessageFuncs *msg;
   msg = global( "Info Messages", GFUSE_TRANSIENT );

The global function returns a pointer to an LWMessageFuncs.

   typedef struct st_LWMessageFuncs {
      void (*info)    (const char *str1, const char *str2);
      void (*error)   (const char *str1, const char *str2);
      void (*warning) (const char *str1, const char *str2);
   } LWMessageFuncs;

The str1 and str2 arguments to these functions are each a single line of text to be displayed in a message dialog with an OK button. The second argument is optional and may be NULL for one-line messages. The only real difference between these three functions is in the appearance of the message dialog, which is used to alert the user to the severity of the message.

Example

This code fragment displays everyone's favorite first message.

   #include <lwserver.h>
   #include <lwhost.h>

   LWMessageFuncs *msg;

   msg = global( "Info Messages", GFUSE_TRANSIENT );

   if ( msg ) {
      msg->info( "Hello, world!", NULL );
   }