home *** CD-ROM | disk | FTP | other *** search
/ Windows 95 v2.4 Fix / W95-v2.4fix.iso / ACADWIN / ADS / CPP / HELLOADS / HELLOADS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-08  |  3.6 KB  |  108 lines

  1. /* 
  2.     HELLOADS.H -
  3.     
  4.     This file:
  5.  
  6.         Delcares traditional Windows Application object, 
  7.         WIN_APP, and ADS_APP is then derived to employ ADS 
  8.         functions.
  9.         
  10.  
  11.     (C) Copyright 1988-1994 by Autodesk, Inc.
  12.  
  13.     This program is copyrighted by Autodesk, Inc. and is  licensed
  14.     to you under the following conditions.  You may not distribute
  15.     or  publish the source code of this program in any form.   You
  16.     may  incorporate this code in object form in derivative  works
  17.     provided  such  derivative  works  are  (i.) are  designed and
  18.     intended  to  work  solely  with  Autodesk, Inc. products, and
  19.     (ii.)  contain  Autodesk's  copyright  notice  "(C)  Copyright
  20.     1988-1994 by Autodesk, Inc."
  21.  
  22.     AUTODESK  PROVIDES THIS PROGRAM "AS IS" AND WITH  ALL  FAULTS.
  23.     AUTODESK  SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF  MER-
  24.     CHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK,  INC.
  25.     DOES  NOT  WARRANT THAT THE OPERATION OF THE PROGRAM  WILL  BE
  26.     UNINTERRUPTED OR ERROR FREE.
  27.  
  28. */
  29. #ifndef HELLOADS_H
  30. #define HELLOADS_H
  31.  
  32. #include "adsinc.h"
  33. #include "mainwnd.h"
  34. #include "resource.h"
  35.  
  36. #define APP_NAME    "HELLOADS"
  37.  
  38. /******************************************************************************
  39. *                                                                             *
  40. *                               WIN_APP                                       *
  41. *                                                                             *
  42. ******************************************************************************/
  43. class WIN_APP : ADS_OBJ
  44. {
  45.     friend HINSTANCE AppInstance();
  46.  
  47. protected:
  48.     MSG                 msg;
  49.     WINDOW              *main_wnd;
  50.  
  51.     HINSTANCE           main_hinst;
  52.     HINSTANCE           prev_hinst;
  53.     int                 ncmdshow;
  54.     ADS_STRING          cmdline;
  55.  
  56. public:
  57.     virtual BOOL        InitInstance( HINSTANCE hInst, HINSTANCE hprev );
  58.     virtual BOOL        InitApplication( int nCmdShow, LPSTR lpcmd );
  59.     void                ShowMainWindow();
  60.     virtual int         Run( void );
  61.  
  62.     virtual BOOL        Valid(){ return main_hinst != NULL; }
  63.  
  64.                         WIN_APP();
  65.     WINDOW*             MainWindow() { return main_wnd; }
  66. };
  67.  
  68. /******************************************************************************
  69. *                                                                             *
  70. *                                 ADS_APP                                     *
  71. *                                                                             *
  72. ******************************************************************************/
  73. class ADS_APP : public WIN_APP
  74. {
  75. protected:
  76.     int                 ads_stat;
  77.     short               scode;
  78.  
  79. public:
  80.     BOOL                InitApplication( int nCmdShow, LPSTR _cmdline );
  81.     BOOL                AdsLoop();
  82.     virtual int         Run( void );
  83.  
  84.     virtual BOOL        Valid(){ return main_hinst != NULL; }
  85.  
  86.                         ADS_APP()
  87.                         { 
  88.                             ads_stat = 0;
  89.                             scode    = RSRSLT;
  90.                         }
  91.  
  92. };
  93.  
  94. //-----------------------------------------------------------------------------
  95. // Globals
  96. //
  97. extern ADS_APP          myapp;
  98.  
  99. extern HINSTANCE        AppInstance();
  100. extern char*            ModuleName();
  101. extern LRESULT CALLBACK WndProc( HWND hWnd
  102.                                 , UINT iMessage
  103.                                 , WPARAM wParam
  104.                                 , LPARAM lParam );
  105.  
  106.  
  107. #endif
  108.