Visual C++ and MFC Fundamentals Chapter 21: Tree and List Controls
- Click OK
- In the Win32 Application Wizard, in the left frame, click Application Settings. In the
Application Type section, click the DLL radio button - Click Finish
- 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,