FXSend/FXSend.cpp
2025-02-28 17:05:50 +08:00

109 lines
2.4 KiB
C++

// FXSend.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "FXSend.h"
#include "FXSendDlg.h"
#include "..\..\public\MiniDmp\MiniDmp.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFXSendApp
BEGIN_MESSAGE_MAP(CFXSendApp, CWinApp)
//{{AFX_MSG_MAP(CFXSendApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFXSendApp construction
CFXSendApp::CFXSendApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CFXSendApp object
CFXSendApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CFXSendApp initialization
BOOL CFXSendApp::InitInstance()
{
#if _MSC_VER>=1300
#ifdef _M_IX86
//GPTSetSetUnhandledExceptionFilter(); //ÆôÓôíÎóÀ¹½Ø
#endif
#endif
if (!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return FALSE;
}
//CoInitialize(NULL);
CoInitializeEx(NULL,COINIT_MULTITHREADED);
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
//_CrtSetBreakAlloc(1946);
CFXSendDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
int CFXSendApp::ExitInstance()
{
CoUninitialize();
#ifdef DEBUG_CHECK_MEM
#ifdef _DEBUG
_CrtDumpMemoryLeaks();
#endif
#endif
return CWinApp::ExitInstance();
}