C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WSETSIZE.C
                                             Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
/* WSETSIZE.C - Demonstrate setting the
 * size of a QuickWin window on the screen
 */
 
#include <io.h>
#include <stdio.h>
 
#define OPENFLAGS   "w"          /* Access permission */
#define PERSISTFLAG _WINPERSIST  /* Keep on screen */
 
void main()
{
   int nRes;                /* Result */
   FILE *wp;                /* File pointer */
   struct _wsizeinfo ws;    /* Size information */
 
   /* Open a window */
   /* NULL arguments accept default characteristics */
   wp = _fwopen( NULL, NULL, OPENFLAGS );
   if( wp == NULL )
   {
      printf( "***ERROR:_fwopen\n" );
      exit( -1 );
   }
 
   /* Minimize the window to an icon */
   ws._version = _QWINVER;
   ws._type = _WINSIZEMIN;
 
   nRes = _wsetsize( _fileno( wp ), &ws );
   if( nRes == -1 )
   {
      printf( "***ERROR: _wsetsize\n" );
      exit( -1 );
   }
 
   nRes = _wclose( _fileno( wp ), PERSISTFLAG );
 
   exit( 0 );
}
                                    -♦-