home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 1.ddi / WINLBSRC.ZIP / EWINPROC.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.1 KB  |  60 lines

  1. /*------------------------------------------------------------------------
  2.  * filename - ewinproc.cpp
  3.  *
  4.  * Startup and exit procedures for EasyWindows
  5.  *-----------------------------------------------------------------------*/
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 5.0
  9.  *
  10.  *      Copyright (c) 1991, 1992 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14.  
  15. #include <windows.h>
  16.  
  17. // These are RTL variables
  18.  
  19. extern unsigned _hInstance;
  20. extern unsigned _hPrev;
  21. extern int      _cmdShow;
  22.  
  23. // These are dummy ones for linkage purposes
  24.  
  25. extern unsigned __hInstance;
  26. extern unsigned __hPrev;
  27. extern int      __cmdShow;
  28.  
  29. void __InitEasyWin(void);
  30. void far __ExitEasyWin(void);
  31. void __CreateEasyWin(void);
  32.  
  33. // Create CRT window if required
  34.  
  35. extern "C" void _InitEasyWin(void)
  36. {
  37.     __InitEasyWin();
  38. }
  39.  
  40.  
  41. // EasyWin unit exit procedure
  42.  
  43. static void far ExitEasyWin(void)
  44. {
  45.     __ExitEasyWin();
  46. }
  47.  
  48. #pragma exit ExitEasyWin 20
  49.  
  50.  
  51. static void CreateEasyWin(void)
  52. {
  53.     __hInstance = _hInstance;
  54.     __hPrev = _hPrev;
  55.     __cmdShow = _cmdShow;
  56.     __CreateEasyWin();
  57. }
  58.  
  59. #pragma startup CreateEasyWin 20
  60.