home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c163 / 3.ddi / SCRE_SOU.EXE / W4GENERA.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-29  |  1.1 KB  |  45 lines

  1. /* w4general.c  General Window Routines  (c)Copyright Sequiter Software Inc., 1991.  All rights reserved. */
  2.  
  3. #include "c4window.h"
  4. #include "e4error.h"
  5.  
  6. #ifdef __TURBOC__
  7.    #pragma hdrstop
  8. #endif
  9.  
  10. void general4_init( W4GENERAL *gw, C4WINDOWS *cw, char *class_name, char *caption, DWORD style,
  11.                     int x, int y, int width, int height, HWND parent, HMENU menu )
  12. {
  13.    gw->hWindow = w4create_window( class_name, caption, style, x, y, width,
  14.                                   height, parent, menu, cw->cb.hInst, 0 ) ;
  15.  
  16.    gw->hEnable       = 0 ;
  17.    gw->IsDestroyed   = 0 ;
  18.    gw->cw            = cw ;
  19.    gw->Id            = menu ;
  20.    gw->Style         = style ;
  21.    gw->OldWindowProc = 0 ;
  22. }
  23.  
  24. void general4_read( W4GENERAL *gw, HWND hDisableWindow )
  25. {
  26.    MSG msg ;
  27.  
  28.    if ( hDisableWindow != 0 )
  29.    {
  30.       EnableWindow( hDisableWindow, 0 ) ;
  31.       gw->hEnable = hDisableWindow ;
  32.    }
  33.    else
  34.      gw->hEnable = 0 ;
  35.  
  36.    for( ; ! gw->IsDestroyed ; )
  37.    {
  38.       if ( ! GetMessage( &msg, NULL, NULL, NULL ))
  39.          break ;
  40.  
  41.       TranslateMessage( &msg ) ;
  42.       DispatchMessage ( &msg ) ;
  43.    }
  44. }
  45.