home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / MS_DAO.SDK / DISK4 / DAOSDK.1 / daoemp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-07  |  1.4 KB  |  62 lines

  1. // DAOEMP.h : main header file for the DAOEMP application
  2. //
  3.  
  4. #include <dbdao.h>            //DAO Classes
  5.  
  6. #ifndef __AFXWIN_H__
  7.     #error include 'stdafx.h' before including this file for PCH
  8. #endif
  9.  
  10. #include "resource.h"       // main symbols
  11.  
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // Conversion macros/inline functions - Variant 
  15.  
  16. // Convert a variant to a string (only if it's already a string variant)
  17. inline void VarToCStr(CString *c, COleVariant *v)
  18. {
  19.     if(v->vt==VT_BSTR)
  20.         {
  21.         *c = (LPCTSTR)v->bstrVal;
  22.         }
  23.     else
  24.         {
  25.         *c = _T("");
  26.         }
  27. }
  28.  
  29. #define VTOLONG(v)    ((v).vt==VT_I4 ? (LONG)(v).iVal:0L)
  30. #define VTODATE(v)    ((v).vt==VT_DATE ? (CTime)(v).iVal:0L)
  31.  
  32.  
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CDAOEMPApp:
  35. // See DAOEMP.cpp for the implementation of this class
  36. //
  37.  
  38. class CDAOEMPApp : public CWinApp
  39. {
  40. public:
  41.     CDAOEMPApp();
  42.  
  43. // Overrides
  44.     // ClassWizard generated virtual function overrides
  45.     //{{AFX_VIRTUAL(CDAOEMPApp)
  46.     public:
  47.     virtual BOOL InitInstance();
  48.     //}}AFX_VIRTUAL
  49.  
  50. // Implementation
  51.  
  52.     //{{AFX_MSG(CDAOEMPApp)
  53.     afx_msg void OnAppAbout();
  54.         // NOTE - the ClassWizard will add and remove member functions here.
  55.         //    DO NOT EDIT what you see in these blocks of generated code !
  56.     //}}AFX_MSG
  57.     DECLARE_MESSAGE_MAP()
  58. };
  59.  
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62.