getchar.cpp
上传用户:kennygump
上传日期:2022-07-22
资源大小:347k
文件大小:2k
源码类别:

图形/文字识别

开发平台:

Visual C++

  1. // getchar.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "getchar.h"
  5. #include "getcharDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CGetcharApp
  13. BEGIN_MESSAGE_MAP(CGetcharApp, CWinApp)
  14. //{{AFX_MSG_MAP(CGetcharApp)
  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. // CGetcharApp construction
  22. CGetcharApp::CGetcharApp()
  23. {
  24. // TODO: add construction code here,
  25. // Place all significant initialization in InitInstance
  26. }
  27. /////////////////////////////////////////////////////////////////////////////
  28. // The one and only CGetcharApp object
  29. CGetcharApp theApp;
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CGetcharApp initialization
  32. BOOL CGetcharApp::InitInstance()
  33. {
  34. AfxEnableControlContainer();
  35. VERIFY( 1 == InitSkinMagicLib(AfxGetInstanceHandle(), NULL, NULL, NULL));
  36. VERIFY( 1 == LoadSkinFile("res\xpblue.smf"));
  37. VERIFY( 1 == SetDialogSkin("Dialog" ));
  38. // Standard initialization
  39. // If you are not using these features and wish to reduce the size
  40. //  of your final executable, you should remove from the following
  41. //  the specific initialization routines you do not need.
  42. #ifdef _AFXDLL
  43. Enable3dControls(); // Call this when using MFC in a shared DLL
  44. #else
  45. Enable3dControlsStatic(); // Call this when linking to MFC statically
  46. #endif
  47. CGetcharDlg dlg;
  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. // Since the dialog has been closed, return FALSE so that we exit the
  61. //  application, rather than start the application's message pump.
  62. return FALSE;
  63. }