summaryrefslogtreecommitdiff
path: root/plugins/mTextControl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mTextControl')
-rw-r--r--plugins/mTextControl/mtextcontrol_11.vcxproj8
-rw-r--r--plugins/mTextControl/res/version.rc42
-rw-r--r--plugins/mTextControl/src/ImageDataObjectHlp.h2
-rw-r--r--plugins/mTextControl/src/headers.h69
-rw-r--r--plugins/mTextControl/src/main.cpp23
-rw-r--r--plugins/mTextControl/src/services.h18
-rw-r--r--plugins/mTextControl/src/textusers.h2
-rw-r--r--plugins/mTextControl/src/version.h70
8 files changed, 70 insertions, 164 deletions
diff --git a/plugins/mTextControl/mtextcontrol_11.vcxproj b/plugins/mTextControl/mtextcontrol_11.vcxproj
index e964064472..2748a9185e 100644
--- a/plugins/mTextControl/mtextcontrol_11.vcxproj
+++ b/plugins/mTextControl/mtextcontrol_11.vcxproj
@@ -77,7 +77,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -105,7 +105,7 @@
<Optimization>Full</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -134,7 +134,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -161,7 +161,7 @@
<Optimization>Full</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>Use</PrecompiledHeader>
diff --git a/plugins/mTextControl/res/version.rc b/plugins/mTextControl/res/version.rc
index 2ad2a1c5f0..5bfbab4754 100644
--- a/plugins/mTextControl/res/version.rc
+++ b/plugins/mTextControl/res/version.rc
@@ -1,44 +1,38 @@
+// Microsoft Visual C++ generated resource script.
+//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
-#include <windows.h> // include for version info constants
+#include "afxres.h"
#include "..\src\version.h"
-//
-// TO CHANGE VERSION INFORMATION, EDIT PROJECT OPTIONS...
-//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
- PRODUCTVERSION __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
- FILEFLAGSMASK 0x3fL
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x17L
#ifdef _DEBUG
- FILEFLAGS 0x21L
+ FILEFLAGS 0x1L
#else
- FILEFLAGS 0x20L
+ FILEFLAGS 0x0L
#endif
FILEOS 0x4L
- FILETYPE 0x2L
+ FILETYPE 0x0L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
- VALUE "Comments", MTEXT_DESCRIPTION
- VALUE "CompanyName", "Miranda NG"
- VALUE "FileDescription", MTEXT_DISPLAYNAME
- VALUE "FileVersion", __VERSION_STRING_DOT
- VALUE "InternalName", MODULNAME
- VALUE "LegalCopyright", MTEXT_COPYRIGHT
- VALUE "OriginalFilename", MTEXT_FILENAME
- VALUE "ProductName", MTEXT_DISPLAYNAME
- VALUE "ProductVersion", __VERSION_STRING_DOT
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
+ VALUE "FileDescription", __DESCRIPTION
+ VALUE "InternalName", __PLUGIN_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "ProductName", __PLUGIN_NAME
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
VALUE "Translation", 0x0, 1200
END
END
-
diff --git a/plugins/mTextControl/src/ImageDataObjectHlp.h b/plugins/mTextControl/src/ImageDataObjectHlp.h
index 8b8e030f6f..730c6fa550 100644
--- a/plugins/mTextControl/src/ImageDataObjectHlp.h
+++ b/plugins/mTextControl/src/ImageDataObjectHlp.h
@@ -20,8 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _IMAGEDATAOBJECTHLP_
#define _IMAGEDATAOBJECTHLP_
-#include <richole.h>
-
void LoadEmfCache();
void UnloadEmfCache();
HENHMETAFILE CacheIconToEmf(HICON hIcon);
diff --git a/plugins/mTextControl/src/headers.h b/plugins/mTextControl/src/headers.h
index aaa25dfd07..b3df760548 100644
--- a/plugins/mTextControl/src/headers.h
+++ b/plugins/mTextControl/src/headers.h
@@ -20,75 +20,25 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef __headers_h__
#define __headers_h__
-
#define _CRT_SECURE_NO_DEPRECATE
-//Windows headers
#define _WIN32_WINNT 0x0500
#define WINVER 0x0500
#define OEMRESOURCE
-#include <tchar.h>
+
#include <windows.h>
#include <richedit.h>
#include <richole.h>
#include <tom.h>
#include <textserv.h>
-#include <ole2.h>
-#include <commctrl.h>
-#include <stdio.h>
-
-//Resources
-//#include "../res/resource.h"
-
-#ifdef _cplusplus
-extern "C" {
-#endif
- //Miranda headers
- #include <newpluginapi.h>
- #include <win2k.h>
- #include <m_system.h>
- #include <m_clui.h>
- #include <m_clist.h>
- #include <m_options.h>
- #include <m_skin.h>
- #include <m_langpack.h>
- #include <m_database.h>
- #include <m_protocols.h>
- #include <m_utils.h>
-// #include <m_icolib.h>
-// The following ifdef block is the standard way of creating macros which make exporting
-// from a DLL simpler. All files within this DLL are compiled with the MTEXTCONTROL_EXPORTS
-// symbol defined on the command line. this symbol should not be defined on any project
-// that uses this DLL. This way any other project whose source files include this file see
-// DLL_API functions as being imported from a DLL, wheras this DLL sees symbols
-// defined with this macro as being exported.
-#ifdef MTEXTCONTROL_EXPORTS
- #define DLL_API __declspec(dllexport)
-#else
- #define DLL_API __declspec(dllimport)
-#endif // MTEXTCONTROL_EXPORTS
+#include <newpluginapi.h>
+#include <m_langpack.h>
+#include <m_database.h>
-#ifndef MTEXT_NOHELPERS
- #define MTEXT_NOHELPERS
-#endif // MTEXT_NOHELPERS
- #include "m_text.h"
+#include <m_text.h>
+#include <m_smileyadd.h>
-// API for other plugins
- #include "m_mathmodule.h"
- #include <m_smileyadd.h>
-#ifdef _cplusplus
-};
-#endif
-
-// globals
-extern HINSTANCE hInst;
-extern PLUGININFOEX pluginInfoEx;
-
-// dlls
-//#include "dlls.h"
-
-// Project headers
#include "version.h"
#include "services.h"
#include "textusers.h"
@@ -98,4 +48,11 @@ extern PLUGININFOEX pluginInfoEx;
#include "fancy_rtf.h"
#include "textcontrol.h"
+#define MODULNAME "MTextControl" //DB modul for this plugin
+#define MODULTITLE "Text Display"
+
+// globals
+extern HINSTANCE hInst;
+extern PLUGININFOEX pluginInfoEx;
+
#endif // __headers_h__
diff --git a/plugins/mTextControl/src/main.cpp b/plugins/mTextControl/src/main.cpp
index ce41c4bf61..a3573b27da 100644
--- a/plugins/mTextControl/src/main.cpp
+++ b/plugins/mTextControl/src/main.cpp
@@ -30,21 +30,21 @@ HRESULT (WINAPI *MyCreateTextServices)(IUnknown *punkOuter, ITextHost *pITextHos
PLUGININFOEX pluginInfoEx =
{
sizeof(PLUGININFOEX),
- MTEXT_DISPLAYNAME,
- PLUGIN_MAKE_VERSION(__MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM),
- MTEXT_DESCRIPTION,
- MTEXT_AUTHOR,
- MTEXT_EMAIL,
- MTEXT_COPYRIGHT,
- MTEXT_WEBPAGE,
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
UNICODE_AWARE,
- {0x69b9443b, 0xdc58, 0x4876, { 0xad, 0x39, 0xe3, 0xf4, 0x18, 0xa1, 0x33, 0xc5 } } //{69B9443B-DC58-4876-AD39-E3F418A133C5}
-
+ // {69B9443B-DC58-4876-AD39-E3F418A133C5}
+ {0x69b9443b, 0xdc58, 0x4876, {0xad, 0x39, 0xe3, 0xf4, 0x18, 0xa1, 0x33, 0xc5}}
};
-extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
- hInst=hinstDLL;
+ hInst = hinstDLL;
return TRUE;
}
@@ -58,7 +58,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" __declspec(dllexport) int Load(void)
{
-
mir_getLP(&pluginInfoEx);
//6.0A SDK is missing RichEd20.lib for x64
diff --git a/plugins/mTextControl/src/services.h b/plugins/mTextControl/src/services.h
index 28917834a1..589c33cba2 100644
--- a/plugins/mTextControl/src/services.h
+++ b/plugins/mTextControl/src/services.h
@@ -23,14 +23,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
void LoadServices();
void UnloadServices();
-DLL_API HANDLE DLL_CALLCONV MTI_MTextCreate (HANDLE userHandle, char *text);
-DLL_API HANDLE DLL_CALLCONV MTI_MTextCreateW (HANDLE userHandle, WCHAR *text);
-DLL_API HANDLE DLL_CALLCONV MTI_MTextCreateEx (HANDLE userHandle, HANDLE hContact, void *text, DWORD flags);
-DLL_API int DLL_CALLCONV MTI_MTextMeasure (HDC dc, SIZE *sz, HANDLE text);
-DLL_API int DLL_CALLCONV MTI_MTextDisplay (HDC dc, POINT pos, SIZE sz, HANDLE text);
-DLL_API int DLL_CALLCONV MTI_MTextSetParent (HANDLE text, HWND hwnd, RECT rect);
-DLL_API int DLL_CALLCONV MTI_MTextSendMessage (HWND hwnd, HANDLE text, UINT msg, WPARAM wParam, LPARAM lParam);
-DLL_API HWND DLL_CALLCONV MTI_MTextCreateProxy (HANDLE text);
-DLL_API int DLL_CALLCONV MTI_MTextDestroy (HANDLE text);
+__declspec(dllexport) HANDLE DLL_CALLCONV MTI_MTextCreate (HANDLE userHandle, char *text);
+__declspec(dllexport) HANDLE DLL_CALLCONV MTI_MTextCreateW (HANDLE userHandle, WCHAR *text);
+__declspec(dllexport) HANDLE DLL_CALLCONV MTI_MTextCreateEx (HANDLE userHandle, HANDLE hContact, void *text, DWORD flags);
+__declspec(dllexport) int DLL_CALLCONV MTI_MTextMeasure (HDC dc, SIZE *sz, HANDLE text);
+__declspec(dllexport) int DLL_CALLCONV MTI_MTextDisplay (HDC dc, POINT pos, SIZE sz, HANDLE text);
+__declspec(dllexport) int DLL_CALLCONV MTI_MTextSetParent (HANDLE text, HWND hwnd, RECT rect);
+__declspec(dllexport) int DLL_CALLCONV MTI_MTextSendMessage (HWND hwnd, HANDLE text, UINT msg, WPARAM wParam, LPARAM lParam);
+__declspec(dllexport) HWND DLL_CALLCONV MTI_MTextCreateProxy (HANDLE text);
+__declspec(dllexport) int DLL_CALLCONV MTI_MTextDestroy (HANDLE text);
#endif // __services_h__
diff --git a/plugins/mTextControl/src/textusers.h b/plugins/mTextControl/src/textusers.h
index a0d135bbe8..c205af851e 100644
--- a/plugins/mTextControl/src/textusers.h
+++ b/plugins/mTextControl/src/textusers.h
@@ -37,7 +37,7 @@ void UnloadTextUsers();
extern HANDLE htuDefault;
-DLL_API HANDLE DLL_CALLCONV MTI_TextUserAdd(const char *userTitle, DWORD options);
+__declspec(dllexport) HANDLE DLL_CALLCONV MTI_TextUserAdd(const char *userTitle, DWORD options);
DWORD TextUserGetOptions(HANDLE userHandle);
void TextUserSetOptions(HANDLE userHandle, DWORD options);
diff --git a/plugins/mTextControl/src/version.h b/plugins/mTextControl/src/version.h
index 8f433dde0b..9405712d42 100644
--- a/plugins/mTextControl/src/version.h
+++ b/plugins/mTextControl/src/version.h
@@ -1,56 +1,14 @@
-/*
-Popup Plus plugin for Miranda IM
-
-Copyright © 2002 Luca Santarelli,
- © 2005-2007 Victor Pavlychko
- © 2010 Merlin_de
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-===============================================================================
-
-File name : $HeadURL$
-Revision : $Revision$
-Last change on : $Date$
-Last change by : $Author$
-
-===============================================================================
-*/
- #define MODULNAME "MTextControl" //DB modul for this plugin
- #define MODULTITLE "Text Display"
-
-
- #define MTEXT_DISPLAYNAME "Miranda Text Control"
- #define MTEXT_FILENAME "mtextcontrol.dll"
-
- #define __MAJOR_VERSION 0
- #define __MINOR_VERSION 8
- #define __RELEASE_NUM 0
- #define __BUILD_NUM 1
-
- #define __STRINGIFY(x) #x
- #define __STRINGIFY2(x) __STRINGIFY(x)
- #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
- #define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
-
- #define __VERSION_STRING __STRINGIFY2(__FILEVERSION_STRING)
- #define __VERSION_STRING_DOT __STRINGIFY2(__FILEVERSION_STRING_DOTS)
-
- #define MTEXT_DESCRIPTION "Provides text render API for different plugins."
- #define MTEXT_AUTHOR "Merlin_de, Victor Pavlychko"
- #define MTEXT_EMAIL ""
- #define MTEXT_COPYRIGHT "©2005-2006 Victor Pavlychko, ©2010 Merlin_de"
- #define MTEXT_WEBPAGE "http://miranda-ng.org/"
-
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 8
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 1
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+
+#define __PLUGIN_NAME "Miranda text control"
+#define __FILENAME "mTextControl.dll"
+#define __DESCRIPTION "Provides text render API for different plugins."
+#define __AUTHOR "Merlin_de, Victor Pavlychko"
+#define __AUTHOREMAIL ""
+#define __AUTHORWEB "http://miranda-ng.org/"
+#define __COPYRIGHT "© 2005-2006 Victor Pavlychko, 2010 Merlin_de"