-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdllmain.cpp
More file actions
59 lines (46 loc) · 1.27 KB
/
dllmain.cpp
File metadata and controls
59 lines (46 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// dllmain.cpp : Implementation of DllMain.
#include "stdafx.h"
#include "resource.h"
#include "dllmain.h"
#include <Inventor\Win\SoWin.h>
#include <EAF\ComponentModule.h>
#include "RCCapacity/RCCapacityTool.h"
#include "M3C/M3CTool.h"
#include "SVT/SVTTool.h"
#include "CLSID.h"
WBFL::EAF::ComponentModule Module_;
EAF_BEGIN_OBJECT_MAP(ObjectMap)
EAF_OBJECT_ENTRY(CLSID_RCCapacityTool, CRCCapacityTool)
EAF_OBJECT_ENTRY(CLSID_SVTTool, CSVTTool)
EAF_OBJECT_ENTRY(CLSID_M3CTool, CM3CTool)
EAF_END_OBJECT_MAP()
class CBEToolboxExtensionsApp : public CWinApp
{
public:
// Overrides
virtual BOOL InitInstance();
virtual int ExitInstance();
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CBEToolboxExtensionsApp, CWinApp)
END_MESSAGE_MAP()
CBEToolboxExtensionsApp theApp;
BOOL CBEToolboxExtensionsApp::InitInstance()
{
Module_.Init(ObjectMap);
GXInit();
// Initialize open inventor
AfxEnableMemoryTracking(FALSE);
if (SoWin::getTopLevelWidget() == nullptr)
{
SoWin::init("WSDOT"); // this guy is a big memory leaker... disable memory tracking so we don't have to deal with leaks we can't fix
}
AfxEnableMemoryTracking(TRUE);
return CWinApp::InitInstance();
}
int CBEToolboxExtensionsApp::ExitInstance()
{
GXTerminate();
Module_.Term();
return CWinApp::ExitInstance();
}