diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /extensions/test/ole/MfcControl | |
parent | Initial commit. (diff) | |
download | libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.tar.xz libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControl.cpp | 99 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControl.def | 9 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControl.dsp | 265 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControl.h | 53 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControl.odl | 82 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControl.rc | 163 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControl.sln | 25 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControl.vcproj | 581 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControlCtl.cpp | 364 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControlCtl.h | 116 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControlCtl.png | bin | 0 -> 204 bytes | |||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControlPpg.cpp | 96 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/MfcControlPpg.h | 66 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/Resource.h | 40 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/StdAfx.cpp | 25 | ||||
-rw-r--r-- | extensions/test/ole/MfcControl/StdAfx.h | 50 |
16 files changed, 2034 insertions, 0 deletions
diff --git a/extensions/test/ole/MfcControl/MfcControl.cpp b/extensions/test/ole/MfcControl/MfcControl.cpp new file mode 100644 index 000000000..74f10830e --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControl.cpp @@ -0,0 +1,99 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +// MfcControl.cpp : Implementation of CMfcControlApp and DLL registration. + +#include "stdafx.h" +#include "MfcControl.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +CMfcControlApp NEAR theApp; + +const GUID CDECL BASED_CODE _tlid = + { 0xac221fb3, 0xa0d8, 0x11d4, { 0x83, 0x3b, 0, 0x50, 0x4, 0x52, 0x6a, 0xb4 } }; +const WORD _wVerMajor = 1; +const WORD _wVerMinor = 0; + + + +// CMfcControlApp::InitInstance - DLL initialization + +BOOL CMfcControlApp::InitInstance() +{ + BOOL bInit = COleControlModule::InitInstance(); + + if (bInit) + { + // TODO: Add your own module initialization code here. + } + + return bInit; +} + + + +// CMfcControlApp::ExitInstance - DLL termination + +int CMfcControlApp::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; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/MfcControl/MfcControl.def b/extensions/test/ole/MfcControl/MfcControl.def new file mode 100644 index 000000000..8c164a7b5 --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControl.def @@ -0,0 +1,9 @@ +; MfcControl.def : Declares the module parameters.
+
+LIBRARY "MFCCONTROL.OCX"
+
+EXPORTS
+ DllCanUnloadNow PRIVATE
+ DllGetClassObject PRIVATE
+ DllRegisterServer PRIVATE
+ DllUnregisterServer PRIVATE
diff --git a/extensions/test/ole/MfcControl/MfcControl.dsp b/extensions/test/ole/MfcControl/MfcControl.dsp new file mode 100644 index 000000000..f327a9893 --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControl.dsp @@ -0,0 +1,265 @@ +# Microsoft Developer Studio Project File - Name="MfcControl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=MfcControl - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MfcControl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MfcControl.mak" CFG="MfcControl - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MfcControl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "MfcControl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "MfcControl - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "MfcControl - Win32 Unicode Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MfcControl - Win32 Release" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Ext "ocx" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Ext "ocx" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Registering ActiveX Control... +OutDir=.\Release +TargetPath=.\Release\MfcControl.ocx +InputPath=.\Release\MfcControl.ocx +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "MfcControl - Win32 Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Ext "ocx" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Ext "ocx" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Registering ActiveX Control... +OutDir=.\Debug +TargetPath=.\Debug\MfcControl.ocx +InputPath=.\Debug\MfcControl.ocx +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "MfcControl - Win32 Unicode Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Ext "ocx" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Target_Ext "ocx" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Registering ActiveX Control... +OutDir=.\DebugU +TargetPath=.\DebugU\MfcControl.ocx +InputPath=.\DebugU\MfcControl.ocx +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "MfcControl - Win32 Unicode Release" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseU" +# PROP BASE Intermediate_Dir "ReleaseU" +# PROP BASE Target_Ext "ocx" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseU" +# PROP Intermediate_Dir "ReleaseU" +# PROP Target_Ext "ocx" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Registering ActiveX Control... +OutDir=.\ReleaseU +TargetPath=.\ReleaseU\MfcControl.ocx +InputPath=.\ReleaseU\MfcControl.ocx +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "MfcControl - Win32 Release" +# Name "MfcControl - Win32 Debug" +# Name "MfcControl - Win32 Unicode Debug" +# Name "MfcControl - Win32 Unicode Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\MfcControl.cpp +# End Source File +# Begin Source File + +SOURCE=.\MfcControl.def +# End Source File +# Begin Source File + +SOURCE=.\MfcControl.odl +# End Source File +# Begin Source File + +SOURCE=.\MfcControl.rc +# End Source File +# Begin Source File + +SOURCE=.\MfcControlCtl.cpp +# End Source File +# Begin Source File + +SOURCE=.\MfcControlPpg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\MfcControl.h +# End Source File +# Begin Source File + +SOURCE=.\MfcControlCtl.h +# End Source File +# Begin Source File + +SOURCE=.\MfcControlPpg.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\MfcControlCtl.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project + diff --git a/extensions/test/ole/MfcControl/MfcControl.h b/extensions/test/ole/MfcControl/MfcControl.h new file mode 100644 index 000000000..64edc9ae7 --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControl.h @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#if !defined(AFX_MFCCONTROL_H__AC221FBC_A0D8_11D4_833B_005004526AB4__INCLUDED_) +#define AFX_MFCCONTROL_H__AC221FBC_A0D8_11D4_833B_005004526AB4__INCLUDED_ + +#ifdef _MSC_VER +#pragma once +#endif + +// MfcControl.h : main header file for MFCCONTROL.DLL + +#if !defined( __AFXCTL_H__ ) + #error include 'afxctl.h' before including this file +#endif + +#include "resource.h" + + +// CMfcControlApp : See MfcControl.cpp for implementation. + +class CMfcControlApp : public COleControlModule +{ +public: + BOOL InitInstance(); + int ExitInstance(); +}; + +extern const GUID CDECL _tlid; +extern const WORD _wVerMajor; +extern const WORD _wVerMinor; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MFCCONTROL_H__AC221FBC_A0D8_11D4_833B_005004526AB4__INCLUDED) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/MfcControl/MfcControl.odl b/extensions/test/ole/MfcControl/MfcControl.odl new file mode 100644 index 000000000..f00ebe518 --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControl.odl @@ -0,0 +1,82 @@ +// MfcControl.odl : type library source for ActiveX Control project. + +// This file will be processed by the Make Type Library (mktyplib) tool to +// produce the type library (MfcControl.tlb) that will become a resource in +// MfcControl.ocx. + +#include <olectl.h> +#include <idispids.h> + +[ uuid(AC221FB3-A0D8-11D4-833B-005004526AB4), version(1.0), + helpfile("MfcControl.hlp"), + helpstring("MfcControl ActiveX Control module"), + control ] +library MFCCONTROLLib +{ + importlib(STDOLE_TLB); + importlib(STDTYPE_TLB); + + // Primary dispatch interface for CMfcControlCtrl + + [ uuid(AC221FB4-A0D8-11D4-833B-005004526AB4), + helpstring("Dispatch interface for MfcControl Control"), hidden ] + dispinterface _DMfcControl + { + properties: + // NOTE - ClassWizard will maintain property information here. + // Use extreme caution when editing this section. + //{{AFX_ODL_PROP(CMfcControlCtrl) + //}}AFX_ODL_PROP + + methods: + // NOTE - ClassWizard will maintain method information here. + // Use extreme caution when editing this section. + //{{AFX_ODL_METHOD(CMfcControlCtrl) + [id(1)] short inShort(short val); + [id(2)] long inLong(long val); + [id(3)] BSTR inString(BSTR* val); + [id(4)] float inFloat(float val); + [id(5)] double inDouble(double val); + [id(6)] VARIANT inVariant(VARIANT val); + [id(7)] IDispatch* inObject(IDispatch* val); + [id(8)] void outShort([out] short* val); + [id(9)] void outLong([out] long* val); + [id(10)] void outString([out] BSTR* val); + [id(11)] void outFloat([out] float* val); + [id(12)] void outDouble([out] double* val); + [id(13)] void outVariant([out] VARIANT* val); + [id(14)] void outObject([out] IDispatch** val); + //}}AFX_ODL_METHOD + }; + + // Event dispatch interface for CMfcControlCtrl + + [ uuid(AC221FB5-A0D8-11D4-833B-005004526AB4), + helpstring("Event interface for MfcControl Control") ] + dispinterface _DMfcControlEvents + { + properties: + // Event interface has no properties + + methods: + // NOTE - ClassWizard will maintain event information here. + // Use extreme caution when editing this section. + //{{AFX_ODL_EVENT(CMfcControlCtrl) + //}}AFX_ODL_EVENT + }; + + // Class information for CMfcControlCtrl + + [ uuid(AC221FB6-A0D8-11D4-833B-005004526AB4), + helpstring("MfcControl Control"), control ] + coclass MfcControl + { + [default] dispinterface _DMfcControl; + [default, source] dispinterface _DMfcControlEvents; + }; + + + //{{AFX_APPEND_ODL}} + //}}AFX_APPEND_ODL}} +}; +//VT_I2 diff --git a/extensions/test/ole/MfcControl/MfcControl.rc b/extensions/test/ole/MfcControl/MfcControl.rc new file mode 100644 index 000000000..49831c231 --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControl.rc @@ -0,0 +1,163 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +//Microsoft Visual C++ generated resource script. + +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS + + +// Generated from the TEXTINCLUDE 2 resource. + +#include "afxres.h" + + +#undef APSTUDIO_READONLY_SYMBOLS + +#ifdef APSTUDIO_INVOKED + + +// TEXTINCLUDE + + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "1 TYPELIB ""MfcControl.tlb""\r\n" + "\0" +END + + +#endif // APSTUDIO_INVOKED + + + + +// Version + + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "Star Office Entwicklungs GmbH\0" + VALUE "FileDescription", "MfcControl ActiveX Control Module\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "MfcControl\0" + VALUE "LegalCopyright", "Copyright (C) 2000\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "MfcControl.OCX\0" + VALUE "ProductName", "MfcControl ActiveX Control Module\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "OLESelfRegister", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + + +// Bitmap + + +//IDB_MFCCONTROL BITMAP DISCARDABLE "MfcControlCtl.bmp" + + + +// Dialog + + + +IDD_PROPPAGE_MFCCONTROL DIALOG DISCARDABLE 0, 0, 250, 62 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "TODO: Place controls to manipulate properties of MfcControl Control on this dialog.", + IDC_STATIC,7,25,229,16 +END + + + + +// DESIGNINFO + + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_PROPPAGE_MFCCONTROL, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 243 + TOPMARGIN, 7 + BOTTOMMARGIN, 55 + END +END +#endif // APSTUDIO_INVOKED + + + +// String Table + + +STRINGTABLE DISCARDABLE +BEGIN + IDS_MFCCONTROL "MfcControl Control" + IDS_MFCCONTROL_PPG "MfcControl Property Page" + IDS_MFCCONTROL_PPG_CAPTION "General" + +END + + +#ifndef APSTUDIO_INVOKED + + +// Generated from the TEXTINCLUDE 3 resource. + +1 TYPELIB "MfcControl.tlb" + + +#endif // not APSTUDIO_INVOKED + diff --git a/extensions/test/ole/MfcControl/MfcControl.sln b/extensions/test/ole/MfcControl/MfcControl.sln new file mode 100644 index 000000000..24e646c86 --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControl.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MfcControl", "MfcControl.vcproj", "{07D59661-3519-4F10-AE9F-22DB0479E25A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ Unicode Debug|Win32 = Unicode Debug|Win32
+ Unicode Release|Win32 = Unicode Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Debug|Win32.Build.0 = Debug|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Release|Win32.ActiveCfg = Release|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Release|Win32.Build.0 = Release|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/extensions/test/ole/MfcControl/MfcControl.vcproj b/extensions/test/ole/MfcControl/MfcControl.vcproj new file mode 100644 index 000000000..6099d8242 --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControl.vcproj @@ -0,0 +1,581 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="MfcControl"
+ ProjectGUID="{07D59661-3519-4F10-AE9F-22DB0479E25A}"
+ RootNamespace="MfcControl"
+ Keyword="MFCProj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Unicode Release|Win32"
+ OutputDirectory=".\ReleaseU"
+ IntermediateDirectory=".\ReleaseU"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Registering ActiveX Control..."
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\ReleaseU/MfcControl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseU/MfcControl.pch"
+ AssemblerListingLocation=".\ReleaseU/"
+ ObjectFile=".\ReleaseU/"
+ ProgramDataBaseFileName=".\ReleaseU/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_AFXDLL;NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ OutputFile=".\ReleaseU/MfcControl.ocx"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\MfcControl.def"
+ ProgramDatabaseFile=".\ReleaseU/MfcControl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseU/MfcControl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode Debug|Win32"
+ OutputDirectory=".\DebugU"
+ IntermediateDirectory=".\DebugU"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Registering ActiveX Control..."
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\DebugU/MfcControl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\DebugU/MfcControl.pch"
+ AssemblerListingLocation=".\DebugU/"
+ ObjectFile=".\DebugU/"
+ ProgramDataBaseFileName=".\DebugU/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_AFXDLL;_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ OutputFile=".\DebugU/MfcControl.ocx"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\MfcControl.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\DebugU/MfcControl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\DebugU/MfcControl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Registering ActiveX Control..."
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/MfcControl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Release/MfcControl.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_AFXDLL;NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ OutputFile=".\Release/MfcControl.ocx"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\MfcControl.def"
+ ProgramDatabaseFile=".\Release/MfcControl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\Release/MfcControl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Registering ActiveX Control..."
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/MfcControl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Debug/MfcControl.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_AFXDLL;_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ OutputFile=".\Debug/MfcControl.ocx"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\MfcControl.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/MfcControl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\Debug/MfcControl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\MfcControl.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MfcControl.def"
+ >
+ </File>
+ <File
+ RelativePath=".\MfcControl.odl"
+ >
+ <FileConfiguration
+ Name="Unicode Release|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ HeaderFileName="MfcControl_h.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ HeaderFileName="MfcControl_h.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ HeaderFileName="MfcControl_h.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ HeaderFileName="MfcControl_h.h"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\MfcControl.rc"
+ >
+ <FileConfiguration
+ Name="Unicode Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\MfcControlCtl.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MfcControlPpg.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Unicode Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\MfcControl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\MfcControlCtl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\MfcControlPpg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath=".\MfcControlCtl.bmp"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/extensions/test/ole/MfcControl/MfcControlCtl.cpp b/extensions/test/ole/MfcControl/MfcControlCtl.cpp new file mode 100644 index 000000000..402c0ccbf --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControlCtl.cpp @@ -0,0 +1,364 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +// MfcControlCtl.cpp : Implementation of the CMfcControlCtrl ActiveX Control class. + +#include "stdafx.h" +#include "MfcControl.h" +#include "MfcControlCtl.h" +#include "MfcControlPpg.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +IMPLEMENT_DYNCREATE(CMfcControlCtrl, COleControl) + + + +// Message map + +BEGIN_MESSAGE_MAP(CMfcControlCtrl, COleControl) + //{{AFX_MSG_MAP(CMfcControlCtrl) + // NOTE - ClassWizard will add and remove message map entries + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP + ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties) +END_MESSAGE_MAP() + + + +// Dispatch map + +BEGIN_DISPATCH_MAP(CMfcControlCtrl, COleControl) + //{{AFX_DISPATCH_MAP(CMfcControlCtrl) + DISP_FUNCTION(CMfcControlCtrl, "inShort", inShort, VT_I2, VTS_I2) + DISP_FUNCTION(CMfcControlCtrl, "inLong", inLong, VT_I4, VTS_I4) + DISP_FUNCTION(CMfcControlCtrl, "inString", inString, VT_BSTR, VTS_PBSTR) + DISP_FUNCTION(CMfcControlCtrl, "inFloat", inFloat, VT_R4, VTS_R4) + DISP_FUNCTION(CMfcControlCtrl, "inDouble", inDouble, VT_R8, VTS_R8) + DISP_FUNCTION(CMfcControlCtrl, "inVariant", inVariant, VT_VARIANT, VTS_VARIANT) + DISP_FUNCTION(CMfcControlCtrl, "inObject", inObject, VT_DISPATCH, VTS_DISPATCH) + DISP_FUNCTION(CMfcControlCtrl, "outShort", outShort, VT_EMPTY, VTS_PI2) + DISP_FUNCTION(CMfcControlCtrl, "outLong", outLong, VT_EMPTY, VTS_PI4) + DISP_FUNCTION(CMfcControlCtrl, "outString", outString, VT_EMPTY, VTS_PBSTR) + DISP_FUNCTION(CMfcControlCtrl, "outFloat", outFloat, VT_EMPTY, VTS_PR4) + DISP_FUNCTION(CMfcControlCtrl, "outDouble", outDouble, VT_EMPTY, VTS_PR8) + DISP_FUNCTION(CMfcControlCtrl, "outVariant", outVariant, VT_EMPTY, VTS_PVARIANT) + DISP_FUNCTION(CMfcControlCtrl, "outObject", outObject, VT_EMPTY, VTS_PDISPATCH) + //}}AFX_DISPATCH_MAP +END_DISPATCH_MAP() + + + +// Event map + +BEGIN_EVENT_MAP(CMfcControlCtrl, COleControl) + //{{AFX_EVENT_MAP(CMfcControlCtrl) + // NOTE - ClassWizard will add and remove event map entries + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_EVENT_MAP +END_EVENT_MAP() + + + +// Property pages + +// TODO: Add more property pages as needed. Remember to increase the count! +BEGIN_PROPPAGEIDS(CMfcControlCtrl, 1) + PROPPAGEID(CMfcControlPropPage::guid) +END_PROPPAGEIDS(CMfcControlCtrl) + + + +// Initialize class factory and guid + +IMPLEMENT_OLECREATE_EX(CMfcControlCtrl, "MFCCONTROL.MfcControlCtrl.1", + 0xac221fb6, 0xa0d8, 0x11d4, 0x83, 0x3b, 0, 0x50, 0x4, 0x52, 0x6a, 0xb4) + + + +// Type library ID and version + +IMPLEMENT_OLETYPELIB(CMfcControlCtrl, _tlid, _wVerMajor, _wVerMinor) + + + +// Interface IDs + +const IID BASED_CODE IID_DMfcControl = + { 0xac221fb4, 0xa0d8, 0x11d4, { 0x83, 0x3b, 0, 0x50, 0x4, 0x52, 0x6a, 0xb4 } }; +const IID BASED_CODE IID_DMfcControlEvents = + { 0xac221fb5, 0xa0d8, 0x11d4, { 0x83, 0x3b, 0, 0x50, 0x4, 0x52, 0x6a, 0xb4 } }; + + + +// Control type information + +static const DWORD BASED_CODE _dwMfcControlOleMisc = + OLEMISC_ACTIVATEWHENVISIBLE | + OLEMISC_SETCLIENTSITEFIRST | + OLEMISC_INSIDEOUT | + OLEMISC_CANTLINKINSIDE | + OLEMISC_RECOMPOSEONRESIZE; + +IMPLEMENT_OLECTLTYPE(CMfcControlCtrl, IDS_MFCCONTROL, _dwMfcControlOleMisc) + + + +// CMfcControlCtrl::CMfcControlCtrlFactory::UpdateRegistry - +// Adds or removes system registry entries for CMfcControlCtrl + +BOOL CMfcControlCtrl::CMfcControlCtrlFactory::UpdateRegistry(BOOL bRegister) +{ + // TODO: Verify that your control follows apartment-model threading rules. + // Refer to MFC TechNote 64 for more information. + // If your control does not conform to the apartment-model rules, then + // you must modify the code below, changing the 6th parameter from + // afxRegApartmentThreading to 0. + + if (bRegister) + return AfxOleRegisterControlClass( + AfxGetInstanceHandle(), + m_clsid, + m_lpszProgID, + IDS_MFCCONTROL, + IDB_MFCCONTROL, + afxRegApartmentThreading, + _dwMfcControlOleMisc, + _tlid, + _wVerMajor, + _wVerMinor); + else + return AfxOleUnregisterClass(m_clsid, m_lpszProgID); +} + + + +// CMfcControlCtrl::CMfcControlCtrl - Constructor + +CMfcControlCtrl::CMfcControlCtrl() +{ + InitializeIIDs(&IID_DMfcControl, &IID_DMfcControlEvents); + + // TODO: Initialize your control's instance data here. +} + + + +// CMfcControlCtrl::~CMfcControlCtrl - Destructor + +CMfcControlCtrl::~CMfcControlCtrl() +{ + // TODO: Cleanup your control's instance data here. +} + + + +// CMfcControlCtrl::OnDraw - Drawing function + +void CMfcControlCtrl::OnDraw( + CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid) +{ + // TODO: Replace the following code with your own drawing code. + pdc->FillRect(rcBounds, CBrush::FromHandle((HBRUSH)GetStockObject(WHITE_BRUSH))); + pdc->Ellipse(rcBounds); +} + + + +// CMfcControlCtrl::DoPropExchange - Persistence support + +void CMfcControlCtrl::DoPropExchange(CPropExchange* pPX) +{ + ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor)); + COleControl::DoPropExchange(pPX); + + // TODO: Call PX_ functions for each persistent custom property. + +} + + + +// CMfcControlCtrl::OnResetState - Reset control to default state + +void CMfcControlCtrl::OnResetState() +{ + COleControl::OnResetState(); // Resets defaults found in DoPropExchange + + // TODO: Reset any other control state here. +} + + + +// CMfcControlCtrl message handlers + + +short CMfcControlCtrl::inShort(short val) +{ + char buf[256]; + sprintf( buf, "inByte: value= %d", val); + ::MessageBoxA( NULL, buf, "MFCCONTROL.MfcControl", MB_OK); + return val+1; +} + +long CMfcControlCtrl::inLong(long val) +{ + char buf[256]; + sprintf( buf, "inLong: value= %d", val); + ::MessageBoxA( NULL, buf, "MFCCONTROL.MfcControl", MB_OK); + return val+1; +} + +BSTR CMfcControlCtrl::inString(BSTR* val) +{ + CString strResult; + strResult= *val; + char buf[256]; + sprintf( buf, "inString: value= %S", *val); + ::MessageBoxA( NULL, buf, "MFCCONTROL.MfcControl", MB_OK); + strResult += L" an appended string"; + return strResult.AllocSysString(); +} + +float CMfcControlCtrl::inFloat(float val) +{ + char buf[256]; + sprintf( buf, "inFloat: value= %f", val); + ::MessageBoxA( NULL, buf, "MFCCONTROL.MfcControl", MB_OK); + return val+1; +} + +double CMfcControlCtrl::inDouble(double val) +{ + char buf[256]; + sprintf( buf, "inDouble: value= %g", val); + ::MessageBoxA( NULL, buf, "MFCCONTROL.MfcControl", MB_OK); + return val+1; +} + +VARIANT CMfcControlCtrl::inVariant(const VARIANT FAR& val) +{ + VARIANT vaResult; + VariantInit(&vaResult); + VariantCopyInd( &vaResult, const_cast<VARIANT*>(&val)); + if( vaResult.vt == VT_BSTR) + { + char buf[256]; + sprintf( buf, "inVariant: value= %S", vaResult.bstrVal); + ::MessageBoxA( NULL, buf, "MFCCONTROL.MfcControl", MB_OK); + + } + return _variant_t( L" a string from CMfcControlCtrl::inVariant"); +} + +LPDISPATCH CMfcControlCtrl::inObject(LPDISPATCH val) +{ + char buf[256]; + _bstr_t bstr; + HRESULT hr= S_OK; + COleVariant var; + DISPID id; + OLECHAR* name=L"prpString"; + if( SUCCEEDED(hr= val->GetIDsOfNames( IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &id))) + { + DISPPARAMS params={0,0,0,0}; + hr= val->Invoke( id, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, ¶ms, &var,0,0); + + } + + if( var.vt== VT_BSTR) + bstr= var.bstrVal; + sprintf( buf, "inObject: value= %S", (wchar_t*)bstr); + ::MessageBoxA( NULL, buf, "MFCCONTROL.MfcControl", MB_OK); + + return NULL; +} + + +void CMfcControlCtrl::outShort(short* val) +{ + *val= 123; +} + +void CMfcControlCtrl::outLong(long* val) +{ + *val= 1234; +} + +void CMfcControlCtrl::outString(BSTR FAR* val) +{ + *val= SysAllocString(L"A string from CMfcControlCtrl::outString "); +} + +void CMfcControlCtrl::outFloat(float* val) +{ + *val= 3.14f; +} + +void CMfcControlCtrl::outDouble(double* val) +{ + *val= 3.145; +} + +void CMfcControlCtrl::outVariant(VARIANT FAR* val) +{ + VariantInit( val); + val->vt= VT_BSTR; + val->bstrVal= SysAllocString( L"a string in a VARIANT"); +} + +void CMfcControlCtrl::outObject(LPDISPATCH FAR* val) +{ + //{BFE10EBE-8584-11D4-005004526AB4} + HRESULT hr= S_OK; + CLSID clsTestControl; + hr= CLSIDFromProgID( L"AxTestComponents.Basic", &clsTestControl); + + IDispatch* pDisp= NULL; + hr= CoCreateInstance( clsTestControl, NULL, CLSCTX_ALL, __uuidof(IDispatch), (void**)&pDisp); + + if( SUCCEEDED( hr) && val) + { + COleVariant var; + DISPID id; + OLECHAR* name=L"prpString"; + if( SUCCEEDED(hr= pDisp->GetIDsOfNames( IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &id))) + { + COleVariant vaParam1(_T("this is property prpString of AxTestComponents.Basic")); + DISPID dispidPut= DISPID_PROPERTYPUT; + DISPPARAMS params; + params.cArgs= 1; + params.cNamedArgs= 1; + params.rgdispidNamedArgs= &dispidPut; + params.rgvarg= &vaParam1; + + hr= pDisp->Invoke( id, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYPUT, ¶ms, &var,0,0); + *val= pDisp; + } + + } + +} +// VT_I1 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/MfcControl/MfcControlCtl.h b/extensions/test/ole/MfcControl/MfcControlCtl.h new file mode 100644 index 000000000..865085467 --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControlCtl.h @@ -0,0 +1,116 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#if !defined(AFX_MFCCONTROLCTL_H__AC221FC3_A0D8_11D4_833B_005004526AB4__INCLUDED_) +#define AFX_MFCCONTROLCTL_H__AC221FC3_A0D8_11D4_833B_005004526AB4__INCLUDED_ + +#ifdef _MSC_VER +#pragma once +#endif + +// MfcControlCtl.h : Declaration of the CMfcControlCtrl ActiveX Control class. + + +// CMfcControlCtrl : See MfcControlCtl.cpp for implementation. + +class CMfcControlCtrl : public COleControl +{ + DECLARE_DYNCREATE(CMfcControlCtrl) + +// Constructor +public: + CMfcControlCtrl(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMfcControlCtrl) + public: + virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid); + virtual void DoPropExchange(CPropExchange* pPX); + virtual void OnResetState(); + //}}AFX_VIRTUAL + +// Implementation +protected: + ~CMfcControlCtrl(); + + DECLARE_OLECREATE_EX(CMfcControlCtrl) // Class factory and guid + DECLARE_OLETYPELIB(CMfcControlCtrl) // GetTypeInfo + DECLARE_PROPPAGEIDS(CMfcControlCtrl) // Property page IDs + DECLARE_OLECTLTYPE(CMfcControlCtrl) // Type name and misc status + +// Message maps + //{{AFX_MSG(CMfcControlCtrl) + // NOTE - ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +// Dispatch maps + //{{AFX_DISPATCH(CMfcControlCtrl) + afx_msg short inShort(short val); + afx_msg long inLong(long val); + afx_msg BSTR inString(BSTR* val); + afx_msg float inFloat(float val); + afx_msg double inDouble(double val); + afx_msg VARIANT inVariant(const VARIANT FAR& val); + afx_msg LPDISPATCH inObject(LPDISPATCH val); + afx_msg void outShort(short* val); + afx_msg void outLong(long* val); + afx_msg void outString(BSTR FAR* val); + afx_msg void outFloat(float* val); + afx_msg void outDouble(double* val); + afx_msg void outVariant(VARIANT FAR* val); + afx_msg void outObject(LPDISPATCH FAR* val); + //}}AFX_DISPATCH + DECLARE_DISPATCH_MAP() + +// Event maps + //{{AFX_EVENT(CMfcControlCtrl) + //}}AFX_EVENT + DECLARE_EVENT_MAP() + +// Dispatch and event IDs +public: + enum { + //{{AFX_DISP_ID(CMfcControlCtrl) + dispidInShort = 1L, + dispidInLong = 2L, + dispidInString = 3L, + dispidInFloat = 4L, + dispidInDouble = 5L, + dispidInVariant = 6L, + dispidInObject = 7L, + dispidOutShort = 8L, + dispidOutLong = 9L, + dispidOutString = 10L, + dispidOutFloat = 11L, + dispidOutDouble = 12L, + dispidOutVariant = 13L, + dispidOutObject = 14L, + //}}AFX_DISP_ID + }; +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MFCCONTROLCTL_H__AC221FC3_A0D8_11D4_833B_005004526AB4__INCLUDED) +// BYTE + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/MfcControl/MfcControlCtl.png b/extensions/test/ole/MfcControl/MfcControlCtl.png Binary files differnew file mode 100644 index 000000000..77c4758c1 --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControlCtl.png diff --git a/extensions/test/ole/MfcControl/MfcControlPpg.cpp b/extensions/test/ole/MfcControl/MfcControlPpg.cpp new file mode 100644 index 000000000..367122363 --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControlPpg.cpp @@ -0,0 +1,96 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +// MfcControlPpg.cpp : Implementation of the CMfcControlPropPage property page class. + +#include "stdafx.h" +#include "MfcControl.h" +#include "MfcControlPpg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +IMPLEMENT_DYNCREATE(CMfcControlPropPage, COlePropertyPage) + + + +// Message map + +BEGIN_MESSAGE_MAP(CMfcControlPropPage, COlePropertyPage) + //{{AFX_MSG_MAP(CMfcControlPropPage) + // NOTE - ClassWizard will add and remove message map entries + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + + +// Initialize class factory and guid + +IMPLEMENT_OLECREATE_EX(CMfcControlPropPage, "MFCCONTROL.MfcControlPropPage.1", + 0xac221fb7, 0xa0d8, 0x11d4, 0x83, 0x3b, 0, 0x50, 0x4, 0x52, 0x6a, 0xb4) + + + +// CMfcControlPropPage::CMfcControlPropPageFactory::UpdateRegistry - +// Adds or removes system registry entries for CMfcControlPropPage + +BOOL CMfcControlPropPage::CMfcControlPropPageFactory::UpdateRegistry(BOOL bRegister) +{ + if (bRegister) + return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(), + m_clsid, IDS_MFCCONTROL_PPG); + else + return AfxOleUnregisterClass(m_clsid, NULL); +} + + + +// CMfcControlPropPage::CMfcControlPropPage - Constructor + +CMfcControlPropPage::CMfcControlPropPage() : + COlePropertyPage(IDD, IDS_MFCCONTROL_PPG_CAPTION) +{ + //{{AFX_DATA_INIT(CMfcControlPropPage) + // NOTE: ClassWizard will add member initialization here + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_DATA_INIT +} + + + +// CMfcControlPropPage::DoDataExchange - Moves data between page and properties + +void CMfcControlPropPage::DoDataExchange(CDataExchange* pDX) +{ + //{{AFX_DATA_MAP(CMfcControlPropPage) + // NOTE: ClassWizard will add DDP, DDX, and DDV calls here + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_DATA_MAP + DDP_PostProcessing(pDX); +} + + + +// CMfcControlPropPage message handlers + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/MfcControl/MfcControlPpg.h b/extensions/test/ole/MfcControl/MfcControlPpg.h new file mode 100644 index 000000000..cb7cd7164 --- /dev/null +++ b/extensions/test/ole/MfcControl/MfcControlPpg.h @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#if !defined(AFX_MFCCONTROLPPG_H__AC221FC5_A0D8_11D4_833B_005004526AB4__INCLUDED_) +#define AFX_MFCCONTROLPPG_H__AC221FC5_A0D8_11D4_833B_005004526AB4__INCLUDED_ + +#ifdef _MSC_VER +#pragma once +#endif + +// MfcControlPpg.h : Declaration of the CMfcControlPropPage property page class. + + +// CMfcControlPropPage : See MfcControlPpg.cpp.cpp for implementation. + +class CMfcControlPropPage : public COlePropertyPage +{ + DECLARE_DYNCREATE(CMfcControlPropPage) + DECLARE_OLECREATE_EX(CMfcControlPropPage) + +// Constructor +public: + CMfcControlPropPage(); + +// Dialog Data + //{{AFX_DATA(CMfcControlPropPage) + enum { IDD = IDD_PROPPAGE_MFCCONTROL }; + // NOTE - ClassWizard will add data members here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_DATA + +// Implementation +protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + +// Message maps +protected: + //{{AFX_MSG(CMfcControlPropPage) + // NOTE - ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MFCCONTROLPPG_H__AC221FC5_A0D8_11D4_833B_005004526AB4__INCLUDED) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/MfcControl/Resource.h b/extensions/test/ole/MfcControl/Resource.h new file mode 100644 index 000000000..598d26ba3 --- /dev/null +++ b/extensions/test/ole/MfcControl/Resource.h @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by MfcControl.rc + + +#define IDS_MFCCONTROL 1 +#define IDS_MFCCONTROL_PPG 2 + +#define IDS_MFCCONTROL_PPG_CAPTION 200 + +#define IDD_PROPPAGE_MFCCONTROL 200 + + +#define IDB_MFCCONTROL 1 + + +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_CONTROL_VALUE 201 +#define _APS_NEXT_SYMED_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 32768 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/MfcControl/StdAfx.cpp b/extensions/test/ole/MfcControl/StdAfx.cpp new file mode 100644 index 000000000..13bae5702 --- /dev/null +++ b/extensions/test/ole/MfcControl/StdAfx.cpp @@ -0,0 +1,25 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/MfcControl/StdAfx.h b/extensions/test/ole/MfcControl/StdAfx.h new file mode 100644 index 000000000..6e8059a1b --- /dev/null +++ b/extensions/test/ole/MfcControl/StdAfx.h @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#if !defined(AFX_STDAFX_H__AC221FBA_A0D8_11D4_833B_005004526AB4__INCLUDED_) +#define AFX_STDAFX_H__AC221FBA_A0D8_11D4_833B_005004526AB4__INCLUDED_ + +#ifdef _MSC_VER +#pragma once +#endif + +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include <afxctl.h> +#include <afxext.h> +#include <afxdtctl.h> +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include <afxcmn.h> +#endif // _AFX_NO_AFXCMN_SUPPORT + +// Delete the two includes below if you do not wish to use the MFC +// database classes +#include <afxdb.h> +#include <afxdao.h> + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#include <comdef.h> +#endif // !defined(AFX_STDAFX_H__AC221FBA_A0D8_11D4_833B_005004526AB4__INCLUDED_) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |