home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / internet / ftptree / ftptree.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.5 KB  |  85 lines

  1. // FTPTree.cpp : Defines the class behaviors for the application.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14. #include "stdafx.h"
  15. #include "FTPTREE.h"
  16. #include "FTPtrDlg.h"
  17.  
  18. #ifdef _DEBUG
  19. #define new DEBUG_NEW
  20. #undef THIS_FILE
  21. static char THIS_FILE[] = __FILE__;
  22. #endif
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CFTPTREEApp
  26.  
  27. BEGIN_MESSAGE_MAP(CFTPTREEApp, CWinApp)
  28.     //{{AFX_MSG_MAP(CFTPTREEApp)
  29.         // NOTE - the ClassWizard will add and remove mapping macros here.
  30.         //    DO NOT EDIT what you see in these blocks of generated code!
  31.     //}}AFX_MSG
  32.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  33. END_MESSAGE_MAP()
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CFTPTREEApp construction
  37.  
  38. CFTPTREEApp::CFTPTREEApp()
  39. {
  40.     // TODO: add construction code here,
  41.     // Place all significant initialization in InitInstance
  42. }
  43.  
  44. /////////////////////////////////////////////////////////////////////////////
  45. // The one and only CFTPTREEApp object
  46.  
  47. CFTPTREEApp theApp;
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50. // CFTPTREEApp initialization
  51.  
  52. BOOL CFTPTREEApp::InitInstance()
  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.     CFTPTREEDlg 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.         // This should never be called, since FTPTREEDlg handles OnOK() itself
  74.     }
  75.     else if (nResponse == IDCANCEL)
  76.     {
  77.         // TODO: Place code here to handle when the dialog is
  78.         //  dismissed with Cancel
  79.     }
  80.  
  81.     // Since the dialog has been closed, return FALSE so that we exit the
  82.     // application, rather than start the application's message pump.
  83.     return FALSE;
  84. }
  85.