POP3SMTP.cpp
上传用户:pyhyhg
上传日期:2022-08-11
资源大小:56k
文件大小:2k
源码类别:

Email客户端

开发平台:

Visual C++

  1. // POP3SMTP.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "POP3SMTP.h"
  5. #include "POP3SMTPDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CPOP3SMTPApp
  13. BEGIN_MESSAGE_MAP(CPOP3SMTPApp, CWinApp)
  14. //{{AFX_MSG_MAP(CPOP3SMTPApp)
  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. // CPOP3SMTPApp construction
  22. CPOP3SMTPApp::CPOP3SMTPApp()
  23. {
  24. // TODO: add construction code here,
  25. // Place all significant initialization in InitInstance
  26. }
  27. /////////////////////////////////////////////////////////////////////////////
  28. // The one and only CPOP3SMTPApp object
  29. CPOP3SMTPApp theApp;
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CPOP3SMTPApp initialization
  32. BOOL CPOP3SMTPApp::InitInstance()
  33. {
  34. if (!AfxSocketInit())
  35. {
  36. AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
  37. return FALSE;
  38. }
  39. AfxEnableControlContainer();
  40. // Standard initialization
  41. // If you are not using these features and wish to reduce the size
  42. //  of your final executable, you should remove from the following
  43. //  the specific initialization routines you do not need.
  44. #ifdef _AFXDLL
  45. Enable3dControls(); // Call this when using MFC in a shared DLL
  46. #else
  47. Enable3dControlsStatic(); // Call this when linking to MFC statically
  48. #endif
  49. CPOP3SMTPDlg dlg;
  50. m_pMainWnd = &dlg;
  51. int nResponse = dlg.DoModal();
  52. if (nResponse == IDOK)
  53. {
  54. // TODO: Place code here to handle when the dialog is
  55. //  dismissed with OK
  56. }
  57. else if (nResponse == IDCANCEL)
  58. {
  59. // TODO: Place code here to handle when the dialog is
  60. //  dismissed with Cancel
  61. }
  62. // Since the dialog has been closed, return FALSE so that we exit the
  63. //  application, rather than start the application's message pump.
  64. return FALSE;
  65. }