// gcc -o Max_test max_test.c -L/usr/X11R6/lib -lXt -lX11

#include <X11/Intrinsic.h>
#include <X11/Shell.h>

#define	MIN_WIDTH	100
#define	MIN_HEIGHT	100
#define	MAX_WIDTH	500
#define	MAX_HEIGHT	500

main(int argc, char *argv[])
{
  Widget toplevel = ( Widget ) NULL;
  Widget msg = ( Widget ) NULL;

  toplevel = XtInitialize( argv[0], "", NULL, 0, &argc, argv );

  XtVaSetValues( toplevel,
      XtNminWidth, MIN_WIDTH,
      XtNminHeight, MIN_HEIGHT,
      XtNmaxWidth, MAX_WIDTH,
      XtNmaxHeight, MAX_HEIGHT,
      NULL );

  XtMakeResizeRequest( toplevel, MIN_WIDTH, MIN_HEIGHT, NULL, NULL);

  XtRealizeWidget( toplevel );
  XtMainLoop();
}

