home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / datalist / datalist.exe / %MAINDIR% / SAMPLES / Sample9 / LISTSA~1.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-09  |  2.2 KB  |  79 lines

  1. // ListSample.cpp : Defines the class behaviors for the application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "ListSample.h"
  6.  
  7. #include "gtlist32.h" //this was created using classwizard (Classes from OLETypeLib)
  8. #include "gtlist.h"
  9.  
  10. #include "ListSampleDlg.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. // CListSampleApp
  20.  
  21. BEGIN_MESSAGE_MAP(CListSampleApp, CWinApp)
  22.     //{{AFX_MSG_MAP(CListSampleApp)
  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. // CListSampleApp construction
  31.  
  32. CListSampleApp::CListSampleApp()
  33. {
  34.     // TODO: add construction code here,
  35.     // Place all significant initialization in InitInstance
  36. }
  37.  
  38. /////////////////////////////////////////////////////////////////////////////
  39. // The one and only CListSampleApp object
  40.  
  41. CListSampleApp theApp;
  42.  
  43. /////////////////////////////////////////////////////////////////////////////
  44. // CListSampleApp initialization
  45.  
  46. BOOL CListSampleApp::InitInstance()
  47. {
  48.     AfxEnableControlContainer();
  49.  
  50.     // Standard initialization
  51.     // If you are not using these features and wish to reduce the size
  52.     //  of your final executable, you should remove from the following
  53.     //  the specific initialization routines you do not need.
  54.  
  55. #ifdef _AFXDLL
  56.     Enable3dControls();            // Call this when using MFC in a shared DLL
  57. #else
  58.     Enable3dControlsStatic();    // Call this when linking to MFC statically
  59. #endif
  60.  
  61.     CListSampleDlg dlg;
  62.     m_pMainWnd = &dlg;
  63.     int nResponse = dlg.DoModal();
  64.     if (nResponse == IDOK)
  65.     {
  66.         // TODO: Place code here to handle when the dialog is
  67.         //  dismissed with OK
  68.     }
  69.     else if (nResponse == IDCANCEL)
  70.     {
  71.         // TODO: Place code here to handle when the dialog is
  72.         //  dismissed with Cancel
  73.     }
  74.  
  75.     // Since the dialog has been closed, return FALSE so that we exit the
  76.     //  application, rather than start the application's message pump.
  77.     return FALSE;
  78. }
  79.