-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathKCOMChart.cpp
More file actions
106 lines (76 loc) · 2.49 KB
/
Copy pathKCOMChart.cpp
File metadata and controls
106 lines (76 loc) · 2.49 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// KCOMChart.cpp : Implementation of CKCOMChartApp and DLL registration.
#include "stdafx.h"
#include "KCOMChart.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CKCOMChartApp NEAR theApp;
const GUID CDECL BASED_CODE _tlid =
{ 0x503612a2, 0x50b5, 0x11d3, { 0xa7, 0xfe, 0, 0x80, 0xc8, 0x76, 0x3f, 0xa4 } };
const WORD _wVerMajor = 1;
const WORD _wVerMinor = 0;
////////////////////////////////////////////////////////////////////////////
// CKCOMChartApp::InitInstance - DLL initialization
BOOL CKCOMChartApp::InitInstance()
{
BOOL bInit = COleControlModule::InitInstance();
if (bInit)
{
// TODO: Add your own module initialization code here.
}
return bInit;
}
////////////////////////////////////////////////////////////////////////////
// CKCOMChartApp::ExitInstance - DLL termination
int CKCOMChartApp::ExitInstance()
{
// TODO: Add your own module termination code here.
return COleControlModule::ExitInstance();
}
/////////////////////////////////////////////////////////////////////////////
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(void)
{
AFX_MANAGE_STATE(_afxModuleAddrThis);
if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
return ResultFromScode(SELFREG_E_TYPELIB);
if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
return ResultFromScode(SELFREG_E_CLASS);
return NOERROR;
}
/////////////////////////////////////////////////////////////////////////////
// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer(void)
{
AFX_MANAGE_STATE(_afxModuleAddrThis);
if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
return ResultFromScode(SELFREG_E_TYPELIB);
if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
return ResultFromScode(SELFREG_E_CLASS);
return NOERROR;
}
#ifdef _AFXDLL
void AFXAPI _AfxToggleBorderStyle(CWnd* pWnd)
{
if (pWnd->m_hWnd != NULL)
{
// toggle border style and force redraw of border
::SetWindowLong(pWnd->m_hWnd, GWL_STYLE, pWnd->GetStyle() ^ WS_BORDER);
::SetWindowPos(pWnd->m_hWnd, NULL, 0, 0, 0, 0,
SWP_DRAWFRAME | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
}
}
void AFXAPI _AfxToggleAppearance(CWnd* pWnd)
{
if (pWnd->m_hWnd != NULL)
{
// toggle border style and force redraw of border
::SetWindowLong(pWnd->m_hWnd, GWL_EXSTYLE, pWnd->GetExStyle() ^
WS_EX_CLIENTEDGE);
::SetWindowPos(pWnd->m_hWnd, NULL, 0, 0, 0, 0,
SWP_DRAWFRAME | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
}
}
#endif