Source code of Windows XP (NT5)
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.

68 lines
1.9 KiB

  1. // leakyapp.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "leakyapp.h"
  5. #include "leakydlg.h"
  6. #ifdef _DEBUG
  7. #undef THIS_FILE
  8. static char BASED_CODE THIS_FILE[] = __FILE__;
  9. #endif
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CLeakyappApp
  12. BEGIN_MESSAGE_MAP(CLeakyappApp, CWinApp)
  13. //{{AFX_MSG_MAP(CLeakyappApp)
  14. // NOTE - the ClassWizard will add and remove mapping macros here.
  15. // DO NOT EDIT what you see in these blocks of generated code!
  16. //}}AFX_MSG
  17. ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  18. END_MESSAGE_MAP()
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CLeakyappApp construction
  21. CLeakyappApp::CLeakyappApp()
  22. {
  23. // TODO: add construction code here,
  24. // Place all significant initialization in InitInstance
  25. }
  26. /////////////////////////////////////////////////////////////////////////////
  27. // The one and only CLeakyappApp object
  28. CLeakyappApp theApp;
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CLeakyappApp initialization
  31. BOOL CLeakyappApp::InitInstance()
  32. {
  33. // Standard initialization
  34. // If you are not using these features and wish to reduce the size
  35. // of your final executable, you should remove from the following
  36. // the specific initialization routines you do not need.
  37. Enable3dControls();
  38. LoadStdProfileSettings(); // Load standard INI file options (including MRU)
  39. CLeakyappDlg dlg;
  40. m_pMainWnd = &dlg;
  41. INT_PTR nResponse = dlg.DoModal();
  42. if (nResponse == IDOK)
  43. {
  44. // TODO: Place code here to handle when the dialog is
  45. // dismissed with OK
  46. }
  47. else if (nResponse == IDCANCEL)
  48. {
  49. // TODO: Place code here to handle when the dialog is
  50. // dismissed with Cancel
  51. }
  52. // Since the dialog has been closed, return FALSE so that we exit the
  53. // application, rather than start the application's message pump.
  54. return FALSE;
  55. }