home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / CPP / METAKIT.ZIP / EXAMPLES / CATRECV / CATRECV.CPP next >
Encoding:
C/C++ Source or Header  |  1996-12-09  |  2.4 KB  |  86 lines

  1. //    catrecv.cpp  -  catalog receive application sample code
  2. //
  3. //    This is a part of the MetaKit library.
  4. //    Copyright (c) 1996 Meta Four Software.
  5. //    All rights reserved.
  6. /////////////////////////////////////////////////////////////////////////////
  7.  
  8. #include "stdafx.h"
  9. #include "catrecv.h"
  10. #include "MyDlg.h"
  11.  
  12. #ifdef _DEBUG
  13. #define new DEBUG_NEW
  14. #undef THIS_FILE
  15. static char THIS_FILE[] = __FILE__;
  16. #endif
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CMyApp
  20.  
  21. BEGIN_MESSAGE_MAP(CMyApp, CWinApp)
  22.     //{{AFX_MSG_MAP(CMyApp)
  23.         // NOTE - the ClassWizard will add and remove mapping macros here.
  24.         //    DO NOT EDIT what you see in these blocks of generated code!
  25.     //}}AFX_MSG
  26.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  27. END_MESSAGE_MAP()
  28.  
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CMyApp construction
  31.  
  32. CMyApp::CMyApp()
  33. {
  34.     // TODO: add construction code here,
  35.     // Place all significant initialization in InitInstance
  36. }
  37.  
  38. /////////////////////////////////////////////////////////////////////////////
  39. // The one and only CMyApp object
  40.  
  41. CMyApp theApp;
  42.  
  43. /////////////////////////////////////////////////////////////////////////////
  44. // CMyApp initialization
  45.  
  46. BOOL CMyApp::InitInstance()
  47. {
  48.     if (!AfxSocketInit())
  49.     {
  50.         AfxMessageBox("Windows sockets initialization failed.");
  51.         return FALSE;
  52.     }
  53.  
  54.     // Standard initialization
  55.     // If you are not using these features and wish to reduce the size
  56.     //  of your final executable, you should remove from the following
  57.     //  the specific initialization routines you do not need.
  58.  
  59. #ifdef _AFXDLL
  60.     Enable3dControls();            // Call this when using MFC in a shared DLL
  61. #else
  62.     Enable3dControlsStatic();    // Call this when linking to MFC statically
  63. #endif
  64.  
  65.     CMyDlg dlg;
  66.     m_pMainWnd = &dlg;
  67.     int nResponse = dlg.DoModal();
  68.     if (nResponse == IDOK)
  69.     {
  70.         // TODO: Place code here to handle when the dialog is
  71.         //  dismissed with OK
  72.     }
  73.     else if (nResponse == IDCANCEL)
  74.     {
  75.         // TODO: Place code here to handle when the dialog is
  76.         //  dismissed with Cancel
  77.     }
  78.  
  79.     // Since the dialog has been closed, return FALSE so that we exit the
  80.     //  application, rather than start the application's message pump.
  81.     return FALSE;
  82. }
  83.  
  84. /////////////////////////////////////////////////////////////////////////////
  85. // $Id: catrecv.cpp,v 1.2 1996/12/04 14:49:43 jcw Exp $
  86.