TextPlayer.cpp
Upload User: geng8029
Upload Date: 2021-01-30
Package Size: 187k
Code Size: 2k
Category:

Audio program

Development Platform:

Visual C++

  1. // TextPlayer.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "TextPlayer.h"
  5. #include "TextPlayerDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #endif
  9. // CTextPlayerApp
  10. BEGIN_MESSAGE_MAP(CTextPlayerApp, CWinApp)
  11. ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
  12. END_MESSAGE_MAP()
  13. // CTextPlayerApp construction
  14. CTextPlayerApp::CTextPlayerApp()
  15. {
  16. // TODO: add construction code here,
  17. // Place all significant initialization in InitInstance
  18. }
  19. // The one and only CTextPlayerApp object
  20. CTextPlayerApp theApp;
  21. // CTextPlayerApp initialization
  22. BOOL CTextPlayerApp::InitInstance()
  23. {
  24. // InitCommonControlsEx() is required on Windows XP if an application
  25. // manifest specifies use of ComCtl32.dll version 6 or later to enable
  26. // visual styles.  Otherwise, any window creation will fail.
  27. INITCOMMONCONTROLSEX InitCtrls;
  28. InitCtrls.dwSize = sizeof(InitCtrls);
  29. // Set this to include all the common control classes you want to use
  30. // in your application.
  31. InitCtrls.dwICC = ICC_WIN95_CLASSES;
  32. InitCommonControlsEx(&InitCtrls);
  33. CWinApp::InitInstance();
  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. // Change the registry key under which our settings are stored
  40. // TODO: You should modify this string to be something appropriate
  41. // such as the name of your company or organization
  42. SetRegistryKey(_T("Local AppWizard-Generated Applications"));
  43. CTextPlayerDlg dlg;
  44. m_pMainWnd = &dlg;
  45. INT_PTR nResponse = dlg.DoModal();
  46. if (nResponse == IDOK)
  47. {
  48. // TODO: Place code here to handle when the dialog is
  49. //  dismissed with OK
  50. }
  51. else if (nResponse == IDCANCEL)
  52. {
  53. // TODO: Place code here to handle when the dialog is
  54. //  dismissed with Cancel
  55. }
  56. // Since the dialog has been closed, return FALSE so that we exit the
  57. //  application, rather than start the application's message pump.
  58. return FALSE;
  59. }