Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

116 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Abstract:
  4. @doc
  5. @module VssTest.cpp | Main file for the Vss test application
  6. @end
  7. Author:
  8. Adi Oltean [aoltean] 07/22/1999
  9. Revision History:
  10. Name Date Comments
  11. aoltean 07/22/1999 Created
  12. --*/
  13. /////////////////////////////////////////////////////////////////////////////
  14. // Includes
  15. #include "stdafx.hxx"
  16. #include "GenDlg.h"
  17. #include "VssTest.h"
  18. #include "ConnDlg.h"
  19. #ifdef _DEBUG
  20. #define new DEBUG_NEW
  21. #undef THIS_FILE
  22. static char THIS_FILE[] = __FILE__;
  23. #endif
  24. #pragma warning( disable: 4189 ) /* local variable is initialized but not referenced */
  25. #include <atlimpl.cpp>
  26. #pragma warning( default: 4189 ) /* local variable is initialized but not referenced */
  27. /////////////////////////////////////////////////////////////////////////////
  28. // CVssTestApp
  29. BEGIN_MESSAGE_MAP(CVssTestApp, CWinApp)
  30. //{{AFX_MSG_MAP(CVssTestApp)
  31. // NOTE - the ClassWizard will add and remove mapping macros here.
  32. // DO NOT EDIT what you see in these blocks of generated code!
  33. //}}AFX_MSG
  34. ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  35. END_MESSAGE_MAP()
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CVssTestApp construction
  38. CVssTestApp::CVssTestApp()
  39. {
  40. // TODO: add construction code here,
  41. // Place all significant initialization in InitInstance
  42. }
  43. /////////////////////////////////////////////////////////////////////////////
  44. // The one and only CVssTestApp object
  45. CVssTestApp theApp;
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CVssTestApp initialization
  48. BOOL CVssTestApp::InitInstance()
  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. CoInitialize(NULL);
  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. CConnectDlg dlg;
  61. m_pMainWnd = &dlg;
  62. int nResponse = (int)dlg.DoModal();
  63. if (nResponse == IDOK)
  64. {
  65. // TODO: Place code here to handle when the dialog is
  66. // dismissed with OK
  67. }
  68. else if (nResponse == IDCANCEL)
  69. {
  70. // TODO: Place code here to handle when the dialog is
  71. // dismissed with Cancel
  72. }
  73. // Avoid a AV on lclosing the app.
  74. m_pMainWnd = NULL;
  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. BOOL CVssTestApp::ExitInstance()
  80. {
  81. CoUninitialize();
  82. return CWinApp::ExitInstance();
  83. }