// ole test3.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "ole test3.h"
#include "ole test3Dlg.h"
#include "excel.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// COletest3App

BEGIN_MESSAGE_MAP(COletest3App, CWinApp)
	//{{AFX_MSG_MAP(COletest3App)
	//}}AFX_MSG
	ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// COletest3App construction

COletest3App::COletest3App()
{
}

/////////////////////////////////////////////////////////////////////////////
// The one and only COletest3App object

COletest3App theApp;

/////////////////////////////////////////////////////////////////////////////
// COletest3App initialization

BOOL COletest3App::InitInstance()
{
	// Standard initialization

	COletest3Dlg dlg;
	m_pMainWnd = &dlg;
	int nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
	}
	else if (nResponse == IDCANCEL)
	{
	}
	if(!AfxOleInit()) // Your addition starts here
	{
		AfxMessageBox("Could not initialize COM dll");
		return FALSE;
	}               // End of your addition

	// Since the dialog has been closed, return FALSE so that we exit the
	//  application, rather than start the application's message pump.
	return FALSE;
}
Соседние файлы в папке 2.1
  • #
    01.05.2014169.49 Кб9excel.cpp
  • #
    01.05.201445.29 Кб9excel.h
  • #
    01.05.201420.44 Кб9ole test3.aps
  • #
    01.05.20141.25 Кб8ole test3.clw
  • #
    01.05.20141.47 Кб8ole test3.cpp
  • #
    01.05.20144.18 Кб8ole test3.dsp
  • #
    01.05.2014543 б8ole test3.dsw
  • #
    01.05.20141.21 Кб8ole test3.h
  • #
    01.05.2014533.5 Кб8ole test3.ncb
  • #
    01.05.201449.66 Кб9ole test3.opt