home *** CD-ROM | disk | FTP | other *** search
- /* w4general.c General Window Routines (c)Copyright Sequiter Software Inc., 1991. All rights reserved. */
-
- #include "c4window.h"
- #include "e4error.h"
-
- #ifdef __TURBOC__
- #pragma hdrstop
- #endif
-
- void general4_init( W4GENERAL *gw, C4WINDOWS *cw, char *class_name, char *caption, DWORD style,
- int x, int y, int width, int height, HWND parent, HMENU menu )
- {
- gw->hWindow = w4create_window( class_name, caption, style, x, y, width,
- height, parent, menu, cw->cb.hInst, 0 ) ;
-
- gw->hEnable = 0 ;
- gw->IsDestroyed = 0 ;
- gw->cw = cw ;
- gw->Id = menu ;
- gw->Style = style ;
- gw->OldWindowProc = 0 ;
- }
-
- void general4_read( W4GENERAL *gw, HWND hDisableWindow )
- {
- MSG msg ;
-
- if ( hDisableWindow != 0 )
- {
- EnableWindow( hDisableWindow, 0 ) ;
- gw->hEnable = hDisableWindow ;
- }
- else
- gw->hEnable = 0 ;
-
- for( ; ! gw->IsDestroyed ; )
- {
- if ( ! GetMessage( &msg, NULL, NULL, NULL ))
- break ;
-
- TranslateMessage( &msg ) ;
- DispatchMessage ( &msg ) ;
- }
- }
-