Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Макросы на Visual Vasic к лабораторной работе 3 / 2.1 / ole test3
.cpp// 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