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.

82 lines
2.2 KiB

  1. // wabtool.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "wabtool.h"
  5. #include "wabtoolDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CWabtoolApp
  13. BEGIN_MESSAGE_MAP(CWabtoolApp, CWinApp)
  14. //{{AFX_MSG_MAP(CWabtoolApp)
  15. // NOTE - the ClassWizard will add and remove mapping macros here.
  16. // DO NOT EDIT what you see in these blocks of generated code!
  17. //}}AFX_MSG
  18. ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  19. END_MESSAGE_MAP()
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CWabtoolApp construction
  22. CWabtoolApp::CWabtoolApp()
  23. {
  24. // TODO: add construction code here,
  25. // Place all significant initialization in InitInstance
  26. }
  27. /////////////////////////////////////////////////////////////////////////////
  28. // The one and only CWabtoolApp object
  29. CWabtoolApp theApp;
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CWabtoolApp initialization
  32. BOOL CWabtoolApp::InitInstance()
  33. {
  34. AfxEnableControlContainer();
  35. // Standard initialization
  36. // If you are not using these features and wish to reduce the size
  37. // of your final executable, you should remove from the following
  38. // the specific initialization routines you do not need.
  39. #ifdef _AFXDLL
  40. Enable3dControls(); // Call this when using MFC in a shared DLL
  41. #else
  42. Enable3dControlsStatic(); // Call this when linking to MFC statically
  43. #endif
  44. CCommandLineInfo cmdInfo;
  45. ParseCommandLine(cmdInfo);
  46. CWabtoolDlg dlg;
  47. dlg.m_pszFileName = new CString(cmdInfo.m_strFileName);
  48. m_pMainWnd = &dlg;
  49. int nResponse = dlg.DoModal();
  50. if (nResponse == IDOK)
  51. {
  52. // TODO: Place code here to handle when the dialog is
  53. // dismissed with OK
  54. }
  55. else if (nResponse == IDCANCEL)
  56. {
  57. // TODO: Place code here to handle when the dialog is
  58. // dismissed with Cancel
  59. }
  60. delete(dlg.m_pszFileName);
  61. // Since the dialog has been closed, return FALSE so that we exit the
  62. // application, rather than start the application's message pump.
  63. return FALSE;
  64. }