Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Visual C++ and MFC Fundamentals Chapter 21: Tree and List Controls



  1. Click OK

  2. In the Win32 Application Wizard, in the left frame, click Application Settings. In the
    Application Type section, click the DLL radio button

  3. Click Finish

  4. Change the contents of the MomentOfInertia.cpp file as follows:


// MomentOfInertia.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
// Calculation of the moment of inertia
// Rectangle
extern "C" _declspec(dllexport)double MOIRectangle(double b, double h);
// Semi-Circle
extern "C" _declspec(dllexport)double MOISemiCircle(double r);
// Triangle
extern "C" _declspec(dllexport)double MOITriangle(double b, double h, int);

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
Free download pdf