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

  1. /* 
  2.     MFCADS.H -
  3.     
  4.     This file:
  5.  
  6.         declares a MFC ADS application class.
  7.  
  8.     (C) Copyright 1988-1994 by Autodesk, Inc.
  9.  
  10.     This program is copyrighted by Autodesk, Inc. and is  licensed
  11.     to you under the following conditions.  You may not distribute
  12.     or  publish the source code of this program in any form.   You
  13.     may  incorporate this code in object form in derivative  works
  14.     provided  such  derivative  works  are  (i.) are  designed and
  15.     intended  to  work  solely  with  Autodesk, Inc. products, and
  16.     (ii.)  contain  Autodesk's  copyright  notice  "(C)  Copyright
  17.     1988-1994 by Autodesk, Inc."
  18.  
  19.     AUTODESK  PROVIDES THIS PROGRAM "AS IS" AND WITH  ALL  FAULTS.
  20.     AUTODESK  SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF  MER-
  21.     CHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK,  INC.
  22.     DOES  NOT  WARRANT THAT THE OPERATION OF THE PROGRAM  WILL  BE
  23.     UNINTERRUPTED OR ERROR FREE.
  24.  
  25. */
  26. #ifndef __MFCADS_H_
  27. #define __MFCADS_H_
  28.  
  29. #include <afxwin.h>
  30.  
  31. #include "adsinc.h"
  32.  
  33. /******************************************************************************
  34. *                                                                             *
  35. *                       class: ADS_APP                                        *
  36. *                                                                             *
  37. ******************************************************************************/
  38. //-----------------------------------------------------------------------------
  39. class ADS_APP : public CWinApp
  40. {
  41. public:
  42.     //
  43.     // MFC...
  44.     //
  45.     BOOL            InitApplication();
  46.     BOOL            InitInstance();
  47.     virtual BOOL    OnIdle(LONG lCount);
  48.  
  49.                     ADS_APP();
  50.     virtual         ~ADS_APP(){}
  51.     int             InsertExternFunc(ADS_FUNC_INFO&);
  52.  
  53.     virtual BOOL    Valid() { return app_state = APP_OK ; }
  54.  
  55. typedef int ( ADS_APP::*ADS_RUN_RSP_FUN )( void );
  56.  
  57. typedef void ( ADS_APP::*ADS_APP_RUN_FUNC )( void );
  58.     ADS_APP_RUN_FUNC    run_funs[10];
  59.     int             num_run_funs;
  60.  
  61. protected:
  62.  
  63.     virtual int     LOADFun( void );
  64.     virtual int     SUBRFun( void );
  65.     virtual int     UNLDFun( void );
  66.     virtual int     ENDFun( void ){ return RSRSLT; }
  67.     virtual int     QUITFun( void );
  68.     virtual int     SAVEFun( void ){ return RSRSLT; }
  69.     virtual int     HUPFun( void );
  70.     virtual int     CFGFun( void ){ return RSRSLT; }
  71.  
  72.     int             LOAD_status;
  73.     int             UNLD_status;
  74.     int             SUBR_status;
  75.  
  76.     struct DISPATCHER
  77.     {
  78.         int command;
  79.         ADS_RUN_RSP_FUN rsp_fun;
  80.     };
  81.  
  82. private:
  83.     static DISPATCHER 
  84.                     dispatcher[];
  85.     ADS_FUNC_INFO   exfuns[MAX_ADS_FUNC];
  86.     int             num_funs;
  87.     ADS_APP_STATE   app_state;
  88.  
  89.     BASIC_CPP_STUFF( ADS_APP )
  90. };
  91.  
  92. #endif //__ADSCPP_H_
  93.  
  94.