diff options
| author | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-04-21 20:19:47 +0000 | 
|---|---|---|
| committer | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-04-21 20:19:47 +0000 | 
| commit | 4283465f23806ae4b8ad7344949f55698c16a203 (patch) | |
| tree | 87fcc5270dca90a912da4b94dd4a34dde86e0292 /mTextControl | |
| parent | e94477ebfe52639deb44898f3a67daca6d9b9fa4 (diff) | |
MTextControl - text render API for different plugins
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@12 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'mTextControl')
31 files changed, 5398 insertions, 0 deletions
diff --git a/mTextControl/Changelog.txt b/mTextControl/Changelog.txt new file mode 100644 index 0000000..da8c033 --- /dev/null +++ b/mTextControl/Changelog.txt @@ -0,0 +1,8 @@ +0.8.0.1:
 ++ use precompiled header
 ++ mtextcontrol interface ( faster and no core traffic)
 +0.8.0.0:
 ++ x64 Unicode release
 +! update smileyadd support
 +- remove unused stuff
 ++ add unique ID
 diff --git a/mTextControl/mtextcontrol.dep b/mTextControl/mtextcontrol.dep new file mode 100644 index 0000000..498e0e3 --- /dev/null +++ b/mTextControl/mtextcontrol.dep @@ -0,0 +1,41 @@ +# Microsoft Developer Studio erstellte Abhängigkeitsdatei, einbezogen von mtextcontrol.mak
 +
 +.\src\main.cpp : \
 +	"..\..\include\m_clist.h"\
 +	"..\..\include\m_clui.h"\
 +	"..\..\include\m_database.h"\
 +	"..\..\include\m_langpack.h"\
 +	"..\..\include\m_options.h"\
 +	"..\..\include\m_plugins.h"\
 +	"..\..\include\m_protocols.h"\
 +	"..\..\include\m_skin.h"\
 +	"..\..\include\m_system.h"\
 +	"..\..\include\m_utils.h"\
 +	"..\..\include\newpluginapi.h"\
 +	"..\..\include\statusmodes.h"\
 +	"..\..\include\win2k.h"\
 +	"..\..\include_api\m_smileyadd.h"\
 +	".\api\m_mathmodule.h"\
 +	".\api\m_text.h"\
 +	".\src\fancy_rtf.h"\
 +	".\src\FormattedTextDraw.h"\
 +	".\src\headers.h"\
 +	".\src\ImageDataObjectHlp.h"\
 +	".\src\richeditutils.h"\
 +	".\src\services.h"\
 +	".\src\textcontrol.h"\
 +	".\src\textusers.h"\
 +	"c:\programme\microsoft sdk\include\basetsd.h"\
 +	"c:\programme\microsoft sdk\include\guiddef.h"\
 +	"c:\programme\microsoft sdk\include\propidl.h"\
 +	"c:\programme\microsoft sdk\include\reason.h"\
 +	"c:\programme\microsoft sdk\include\stralign.h"\
 +	"c:\programme\microsoft sdk\include\textserv.h"\
 +	"c:\programme\microsoft sdk\include\tom.h"\
 +	"c:\programme\microsoft sdk\include\tvout.h"\
 +	"c:\programme\microsoft sdk\include\winefs.h"\
 +	
 +
 +.\res\version.rc : \
 +	".\src\version.h"\
 +	
 diff --git a/mTextControl/mtextcontrol.dsp b/mTextControl/mtextcontrol.dsp new file mode 100644 index 0000000..a648909 --- /dev/null +++ b/mTextControl/mtextcontrol.dsp @@ -0,0 +1,296 @@ +# Microsoft Developer Studio Project File - Name="mtextcontrol" - Package Owner=<4>
 +# Microsoft Developer Studio Generated Build File, Format Version 6.00
 +# ** NICHT BEARBEITEN **
 +
 +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
 +
 +CFG=mtextcontrol - Win32 Debug Unicode
 +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
 +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
 +!MESSAGE 
 +!MESSAGE NMAKE /f "mtextcontrol.mak".
 +!MESSAGE 
 +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
 +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
 +!MESSAGE 
 +!MESSAGE NMAKE /f "mtextcontrol.mak" CFG="mtextcontrol - Win32 Debug Unicode"
 +!MESSAGE 
 +!MESSAGE Für die Konfiguration stehen zur Auswahl:
 +!MESSAGE 
 +!MESSAGE "mtextcontrol - Win32 Release" (basierend auf  "Win32 (x86) Dynamic-Link Library")
 +!MESSAGE "mtextcontrol - Win32 Debug" (basierend auf  "Win32 (x86) Dynamic-Link Library")
 +!MESSAGE "mtextcontrol - Win32 Int Release" (basierend auf  "Win32 (x86) Dynamic-Link Library")
 +!MESSAGE "mtextcontrol - Win32 Debug Unicode" (basierend auf  "Win32 (x86) Dynamic-Link Library")
 +!MESSAGE "mtextcontrol - Win32 Release Unicode" (basierend auf  "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)" == "mtextcontrol - Win32 Release"
 +
 +# PROP BASE Use_MFC 0
 +# PROP BASE Use_Debug_Libraries 0
 +# PROP BASE Output_Dir "Release"
 +# PROP BASE Intermediate_Dir "Release"
 +# PROP BASE Target_Dir ""
 +# PROP Use_MFC 0
 +# PROP Use_Debug_Libraries 0
 +# PROP Output_Dir "Release"
 +# PROP Intermediate_Dir "Release\Obj"
 +# PROP Ignore_Export_Lib 1
 +# PROP Target_Dir ""
 +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /YX /FD /c
 +# ADD CPP /nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Yu"headers.h" /FD /c
 +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 +# ADD BASE RSC /l 0x422 /d "NDEBUG"
 +# ADD RSC /l 0x409 /d "NDEBUG"
 +BSC32=bscmake.exe
 +# ADD BASE BSC32 /nologo
 +# ADD BSC32 /nologo
 +LINK32=link.exe
 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib riched20.lib /nologo /base:"0x25a20000" /dll /debug /machine:I386
 +# SUBTRACT LINK32 /map /nodefaultlib
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +# PROP BASE Use_MFC 0
 +# PROP BASE Use_Debug_Libraries 1
 +# PROP BASE Output_Dir "Debug"
 +# PROP BASE Intermediate_Dir "Debug"
 +# PROP BASE Target_Dir ""
 +# PROP Use_MFC 0
 +# PROP Use_Debug_Libraries 1
 +# PROP Output_Dir "Debug"
 +# PROP Intermediate_Dir "Debug\Obj"
 +# PROP Ignore_Export_Lib 1
 +# PROP Target_Dir ""
 +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /YX /FD /GZ /c
 +# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Yu"headers.h" /FD /GZ /c
 +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 +# ADD BASE RSC /l 0x422 /d "_DEBUG"
 +# ADD RSC /l 0x409 /d "_DEBUG"
 +BSC32=bscmake.exe
 +# ADD BASE BSC32 /nologo
 +# ADD BSC32 /nologo
 +LINK32=link.exe
 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib riched20.lib /nologo /base:"0x25a20000" /dll /map /debug /machine:I386 /pdbtype:sept
 +# SUBTRACT LINK32 /nodefaultlib
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +# PROP BASE Use_MFC 0
 +# PROP BASE Use_Debug_Libraries 0
 +# PROP BASE Output_Dir "mtextcontrol___Win32_Int_Release"
 +# PROP BASE Intermediate_Dir "mtextcontrol___Win32_Int_Release"
 +# PROP BASE Ignore_Export_Lib 1
 +# PROP BASE Target_Dir ""
 +# PROP Use_MFC 0
 +# PROP Use_Debug_Libraries 0
 +# PROP Output_Dir "Int_Release"
 +# PROP Intermediate_Dir "Int_Release\Obj"
 +# PROP Ignore_Export_Lib 1
 +# PROP Target_Dir ""
 +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /YX /FD /c
 +# ADD CPP /nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Yu"headers.h" /FD /c
 +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 +# ADD BASE RSC /l 0x422 /d "NDEBUG"
 +# ADD RSC /l 0x409 /d "NDEBUG"
 +BSC32=bscmake.exe
 +# ADD BASE BSC32 /nologo
 +# ADD BSC32 /nologo /o"Int_Release/mtextcontrolW.bsc"
 +LINK32=link.exe
 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x25a20000" /dll /map /machine:I386
 +# SUBTRACT BASE LINK32 /nodefaultlib
 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib riched20.lib /nologo /base:"0x25a20000" /dll /map /debug /machine:I386 /out:"Int_Release/mtextcontrolW.dll" /pdbtype:sept
 +# SUBTRACT LINK32 /nodefaultlib
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +# PROP BASE Use_MFC 0
 +# PROP BASE Use_Debug_Libraries 1
 +# PROP BASE Output_Dir "mtextcontrol___Win32_Debug_Unicode"
 +# PROP BASE Intermediate_Dir "mtextcontrol___Win32_Debug_Unicode"
 +# PROP BASE Ignore_Export_Lib 1
 +# PROP BASE Target_Dir ""
 +# PROP Use_MFC 0
 +# PROP Use_Debug_Libraries 1
 +# PROP Output_Dir "Debug_Unicode"
 +# PROP Intermediate_Dir "Debug_Unicode\Obj"
 +# PROP Ignore_Export_Lib 1
 +# PROP Target_Dir ""
 +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /YX /FD /GZ /c
 +# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Yu"headers.h" /FD /GZ /c
 +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 +# ADD BASE RSC /l 0x422 /d "_DEBUG"
 +# ADD RSC /l 0x409 /d "_DEBUG" /d "UNICODE" /d "_UNICODE"
 +BSC32=bscmake.exe
 +# ADD BASE BSC32 /nologo
 +# ADD BSC32 /nologo /o"Debug_Unicode/mtextcontrolW.bsc"
 +LINK32=link.exe
 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x25a20000" /dll /map /debug /machine:I386 /pdbtype:sept
 +# SUBTRACT BASE LINK32 /nodefaultlib
 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib riched20.lib /nologo /base:"0x25a20000" /dll /map /debug /machine:I386 /out:"Debug_Unicode/mtextcontrolW.dll" /pdbtype:sept
 +# SUBTRACT LINK32 /nodefaultlib
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +# PROP BASE Use_MFC 0
 +# PROP BASE Use_Debug_Libraries 0
 +# PROP BASE Output_Dir "mtextcontrol___Win32_Release_Unicode"
 +# PROP BASE Intermediate_Dir "mtextcontrol___Win32_Release_Unicode"
 +# PROP BASE Ignore_Export_Lib 1
 +# PROP BASE Target_Dir ""
 +# PROP Use_MFC 0
 +# PROP Use_Debug_Libraries 0
 +# PROP Output_Dir "Release_Unicode"
 +# PROP Intermediate_Dir "Release_Unicode\Obj"
 +# PROP Ignore_Export_Lib 1
 +# PROP Target_Dir ""
 +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /YX /FD /c
 +# ADD CPP /nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Yu"headers.h" /FD /c
 +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 +# ADD BASE RSC /l 0x422 /d "NDEBUG"
 +# ADD RSC /l 0x409 /d "NDEBUG" /d "UNICODE" /d "_UNICODE"
 +BSC32=bscmake.exe
 +# ADD BASE BSC32 /nologo
 +# ADD BSC32 /nologo /o"Release_Unicode/mtextcontrolW.bsc"
 +LINK32=link.exe
 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x25a20000" /dll /map /machine:I386
 +# SUBTRACT BASE LINK32 /nodefaultlib
 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib riched20.lib /nologo /base:"0x25a20000" /dll /debug /machine:I386 /out:"Release_Unicode/mtextcontrolW.dll"
 +# SUBTRACT LINK32 /map /nodefaultlib
 +
 +!ENDIF 
 +
 +# Begin Target
 +
 +# Name "mtextcontrol - Win32 Release"
 +# Name "mtextcontrol - Win32 Debug"
 +# Name "mtextcontrol - Win32 Int Release"
 +# Name "mtextcontrol - Win32 Debug Unicode"
 +# Name "mtextcontrol - Win32 Release Unicode"
 +# Begin Group "Source Files"
 +
 +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
 +# Begin Source File
 +
 +SOURCE=.\src\dataobject.cpp
 +# ADD CPP /Yu
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\enumformat.cpp
 +# ADD CPP /Yu
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\fancy_rtf.cpp
 +# ADD CPP /Yu
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\FormattedTextDraw.cpp
 +# ADD CPP /Yu
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\ImageDataObjectHlp.cpp
 +# ADD CPP /Yu
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\main.cpp
 +# ADD CPP /Yc"headers.h"
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\richeditutils.cpp
 +# ADD CPP /Yu
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\services.cpp
 +# ADD CPP /Yu
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\textcontrol.cpp
 +# ADD CPP /Yu
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\textusers.cpp
 +# ADD CPP /Yu
 +# End Source File
 +# End Group
 +# Begin Group "Header Files"
 +
 +# PROP Default_Filter "h;hpp;hxx;hm;inl"
 +# Begin Source File
 +
 +SOURCE=.\src\fancy_rtf.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\FormattedTextDraw.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\headers.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\ImageDataObjectHlp.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\richeditutils.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\services.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\textcontrol.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\textusers.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\src\version.h
 +# End Source File
 +# End Group
 +# Begin Group "api"
 +
 +# PROP Default_Filter ""
 +# Begin Source File
 +
 +SOURCE=.\api\m_text.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=.\res\version.rc
 +# End Source File
 +# End Group
 +# End Target
 +# End Project
 diff --git a/mTextControl/mtextcontrol.dsw b/mTextControl/mtextcontrol.dsw new file mode 100644 index 0000000..ef8cbf2 --- /dev/null +++ b/mTextControl/mtextcontrol.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00
 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
 +
 +###############################################################################
 +
 +Project: "mtextcontrol"=.\mtextcontrol.dsp - Package Owner=<4>
 +
 +Package=<5>
 +{{{
 +}}}
 +
 +Package=<4>
 +{{{
 +}}}
 +
 +###############################################################################
 +
 +Global:
 +
 +Package=<5>
 +{{{
 +}}}
 +
 +Package=<3>
 +{{{
 +}}}
 +
 +###############################################################################
 +
 diff --git a/mTextControl/mtextcontrol.mak b/mTextControl/mtextcontrol.mak new file mode 100644 index 0000000..40086ea --- /dev/null +++ b/mTextControl/mtextcontrol.mak @@ -0,0 +1,979 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on mtextcontrol.dsp
 +!IF "$(CFG)" == ""
 +CFG=mtextcontrol - Win32 Debug Unicode
 +!MESSAGE Keine Konfiguration angegeben. mtextcontrol - Win32 Debug Unicode wird als Standard verwendet.
 +!ENDIF 
 +
 +!IF "$(CFG)" != "mtextcontrol - Win32 Release" && "$(CFG)" != "mtextcontrol - Win32 Debug" && "$(CFG)" != "mtextcontrol - Win32 Int Release" && "$(CFG)" != "mtextcontrol - Win32 Debug Unicode" && "$(CFG)" != "mtextcontrol - Win32 Release Unicode"
 +!MESSAGE Ungltige Konfiguration "$(CFG)" angegeben.
 +!MESSAGE Sie k”nnen beim Ausfhren von NMAKE eine Konfiguration angeben
 +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
 +!MESSAGE 
 +!MESSAGE NMAKE /f "mtextcontrol.mak" CFG="mtextcontrol - Win32 Debug Unicode"
 +!MESSAGE 
 +!MESSAGE Fr die Konfiguration stehen zur Auswahl:
 +!MESSAGE 
 +!MESSAGE "mtextcontrol - Win32 Release" (basierend auf  "Win32 (x86) Dynamic-Link Library")
 +!MESSAGE "mtextcontrol - Win32 Debug" (basierend auf  "Win32 (x86) Dynamic-Link Library")
 +!MESSAGE "mtextcontrol - Win32 Int Release" (basierend auf  "Win32 (x86) Dynamic-Link Library")
 +!MESSAGE "mtextcontrol - Win32 Debug Unicode" (basierend auf  "Win32 (x86) Dynamic-Link Library")
 +!MESSAGE "mtextcontrol - Win32 Release Unicode" (basierend auf  "Win32 (x86) Dynamic-Link Library")
 +!MESSAGE 
 +!ERROR Eine ungltige Konfiguration wurde angegeben.
 +!ENDIF 
 +
 +!IF "$(OS)" == "Windows_NT"
 +NULL=
 +!ELSE 
 +NULL=nul
 +!ENDIF 
 +
 +CPP=cl.exe
 +MTL=midl.exe
 +RSC=rc.exe
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +OUTDIR=.\Release
 +INTDIR=.\Release\Obj
 +# Begin Custom Macros
 +OutDir=.\Release
 +# End Custom Macros
 +
 +ALL : "$(OUTDIR)\mtextcontrol.dll"
 +
 +
 +CLEAN :
 +	-@erase "$(INTDIR)\dataobject.obj"
 +	-@erase "$(INTDIR)\enumformat.obj"
 +	-@erase "$(INTDIR)\fancy_rtf.obj"
 +	-@erase "$(INTDIR)\FormattedTextDraw.obj"
 +	-@erase "$(INTDIR)\ImageDataObjectHlp.obj"
 +	-@erase "$(INTDIR)\main.obj"
 +	-@erase "$(INTDIR)\mtextcontrol.pch"
 +	-@erase "$(INTDIR)\richeditutils.obj"
 +	-@erase "$(INTDIR)\services.obj"
 +	-@erase "$(INTDIR)\textcontrol.obj"
 +	-@erase "$(INTDIR)\textusers.obj"
 +	-@erase "$(INTDIR)\vc60.idb"
 +	-@erase "$(INTDIR)\vc60.pdb"
 +	-@erase "$(INTDIR)\version.res"
 +	-@erase "$(OUTDIR)\mtextcontrol.dll"
 +	-@erase "$(OUTDIR)\mtextcontrol.exp"
 +	-@erase "$(OUTDIR)\mtextcontrol.pdb"
 +
 +"$(OUTDIR)" :
 +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 +
 +"$(INTDIR)" :
 +    if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
 +
 +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
 +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\version.res" /d "NDEBUG" 
 +BSC32=bscmake.exe
 +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mtextcontrol.bsc" 
 +BSC32_SBRS= \
 +	
 +LINK32=link.exe
 +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib riched20.lib /nologo /base:"0x25a20000" /dll /incremental:no /pdb:"$(OUTDIR)\mtextcontrol.pdb" /debug /machine:I386 /out:"$(OUTDIR)\mtextcontrol.dll" /implib:"$(OUTDIR)\mtextcontrol.lib" 
 +LINK32_OBJS= \
 +	"$(INTDIR)\dataobject.obj" \
 +	"$(INTDIR)\enumformat.obj" \
 +	"$(INTDIR)\fancy_rtf.obj" \
 +	"$(INTDIR)\FormattedTextDraw.obj" \
 +	"$(INTDIR)\ImageDataObjectHlp.obj" \
 +	"$(INTDIR)\main.obj" \
 +	"$(INTDIR)\richeditutils.obj" \
 +	"$(INTDIR)\services.obj" \
 +	"$(INTDIR)\textcontrol.obj" \
 +	"$(INTDIR)\textusers.obj" \
 +	"$(INTDIR)\version.res"
 +
 +"$(OUTDIR)\mtextcontrol.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
 +    $(LINK32) @<<
 +  $(LINK32_FLAGS) $(LINK32_OBJS)
 +<<
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +OUTDIR=.\Debug
 +INTDIR=.\Debug\Obj
 +# Begin Custom Macros
 +OutDir=.\Debug
 +# End Custom Macros
 +
 +ALL : "$(OUTDIR)\mtextcontrol.dll"
 +
 +
 +CLEAN :
 +	-@erase "$(INTDIR)\dataobject.obj"
 +	-@erase "$(INTDIR)\enumformat.obj"
 +	-@erase "$(INTDIR)\fancy_rtf.obj"
 +	-@erase "$(INTDIR)\FormattedTextDraw.obj"
 +	-@erase "$(INTDIR)\ImageDataObjectHlp.obj"
 +	-@erase "$(INTDIR)\main.obj"
 +	-@erase "$(INTDIR)\mtextcontrol.pch"
 +	-@erase "$(INTDIR)\richeditutils.obj"
 +	-@erase "$(INTDIR)\services.obj"
 +	-@erase "$(INTDIR)\textcontrol.obj"
 +	-@erase "$(INTDIR)\textusers.obj"
 +	-@erase "$(INTDIR)\vc60.idb"
 +	-@erase "$(INTDIR)\vc60.pdb"
 +	-@erase "$(INTDIR)\version.res"
 +	-@erase "$(OUTDIR)\mtextcontrol.dll"
 +	-@erase "$(OUTDIR)\mtextcontrol.exp"
 +	-@erase "$(OUTDIR)\mtextcontrol.ilk"
 +	-@erase "$(OUTDIR)\mtextcontrol.pdb"
 +	-@erase "$(OUTDIR)\Obj\mtextcontrol.map"
 +
 +"$(OUTDIR)" :
 +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 +
 +"$(INTDIR)" :
 +    if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
 +
 +CPP_PROJ=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
 +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\version.res" /d "_DEBUG" 
 +BSC32=bscmake.exe
 +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mtextcontrol.bsc" 
 +BSC32_SBRS= \
 +	
 +LINK32=link.exe
 +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib riched20.lib /nologo /base:"0x25a20000" /dll /incremental:yes /pdb:"$(OUTDIR)\mtextcontrol.pdb" /map:"$(INTDIR)\mtextcontrol.map" /debug /machine:I386 /out:"$(OUTDIR)\mtextcontrol.dll" /implib:"$(OUTDIR)\mtextcontrol.lib" /pdbtype:sept 
 +LINK32_OBJS= \
 +	"$(INTDIR)\dataobject.obj" \
 +	"$(INTDIR)\enumformat.obj" \
 +	"$(INTDIR)\fancy_rtf.obj" \
 +	"$(INTDIR)\FormattedTextDraw.obj" \
 +	"$(INTDIR)\ImageDataObjectHlp.obj" \
 +	"$(INTDIR)\main.obj" \
 +	"$(INTDIR)\richeditutils.obj" \
 +	"$(INTDIR)\services.obj" \
 +	"$(INTDIR)\textcontrol.obj" \
 +	"$(INTDIR)\textusers.obj" \
 +	"$(INTDIR)\version.res"
 +
 +"$(OUTDIR)\mtextcontrol.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
 +    $(LINK32) @<<
 +  $(LINK32_FLAGS) $(LINK32_OBJS)
 +<<
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +OUTDIR=.\Int_Release
 +INTDIR=.\Int_Release\Obj
 +# Begin Custom Macros
 +OutDir=.\Int_Release
 +# End Custom Macros
 +
 +ALL : "$(OUTDIR)\mtextcontrolW.dll"
 +
 +
 +CLEAN :
 +	-@erase "$(INTDIR)\dataobject.obj"
 +	-@erase "$(INTDIR)\enumformat.obj"
 +	-@erase "$(INTDIR)\fancy_rtf.obj"
 +	-@erase "$(INTDIR)\FormattedTextDraw.obj"
 +	-@erase "$(INTDIR)\ImageDataObjectHlp.obj"
 +	-@erase "$(INTDIR)\main.obj"
 +	-@erase "$(INTDIR)\mtextcontrol.pch"
 +	-@erase "$(INTDIR)\richeditutils.obj"
 +	-@erase "$(INTDIR)\services.obj"
 +	-@erase "$(INTDIR)\textcontrol.obj"
 +	-@erase "$(INTDIR)\textusers.obj"
 +	-@erase "$(INTDIR)\vc60.idb"
 +	-@erase "$(INTDIR)\vc60.pdb"
 +	-@erase "$(INTDIR)\version.res"
 +	-@erase "$(OUTDIR)\mtextcontrolW.dll"
 +	-@erase "$(OUTDIR)\mtextcontrolW.exp"
 +	-@erase "$(OUTDIR)\mtextcontrolW.pdb"
 +	-@erase "$(OUTDIR)\Obj\mtextcontrolW.map"
 +
 +"$(OUTDIR)" :
 +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 +
 +"$(INTDIR)" :
 +    if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
 +
 +CPP_PROJ=/nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
 +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\version.res" /d "NDEBUG" 
 +BSC32=bscmake.exe
 +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mtextcontrolW.bsc" 
 +BSC32_SBRS= \
 +	
 +LINK32=link.exe
 +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib riched20.lib /nologo /base:"0x25a20000" /dll /incremental:no /pdb:"$(OUTDIR)\mtextcontrolW.pdb" /map:"$(INTDIR)\mtextcontrolW.map" /debug /machine:I386 /out:"$(OUTDIR)\mtextcontrolW.dll" /implib:"$(OUTDIR)\mtextcontrolW.lib" /pdbtype:sept 
 +LINK32_OBJS= \
 +	"$(INTDIR)\dataobject.obj" \
 +	"$(INTDIR)\enumformat.obj" \
 +	"$(INTDIR)\fancy_rtf.obj" \
 +	"$(INTDIR)\FormattedTextDraw.obj" \
 +	"$(INTDIR)\ImageDataObjectHlp.obj" \
 +	"$(INTDIR)\main.obj" \
 +	"$(INTDIR)\richeditutils.obj" \
 +	"$(INTDIR)\services.obj" \
 +	"$(INTDIR)\textcontrol.obj" \
 +	"$(INTDIR)\textusers.obj" \
 +	"$(INTDIR)\version.res"
 +
 +"$(OUTDIR)\mtextcontrolW.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
 +    $(LINK32) @<<
 +  $(LINK32_FLAGS) $(LINK32_OBJS)
 +<<
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +OUTDIR=.\Debug_Unicode
 +INTDIR=.\Debug_Unicode\Obj
 +# Begin Custom Macros
 +OutDir=.\Debug_Unicode
 +# End Custom Macros
 +
 +ALL : "$(OUTDIR)\mtextcontrolW.dll"
 +
 +
 +CLEAN :
 +	-@erase "$(INTDIR)\dataobject.obj"
 +	-@erase "$(INTDIR)\enumformat.obj"
 +	-@erase "$(INTDIR)\fancy_rtf.obj"
 +	-@erase "$(INTDIR)\FormattedTextDraw.obj"
 +	-@erase "$(INTDIR)\ImageDataObjectHlp.obj"
 +	-@erase "$(INTDIR)\main.obj"
 +	-@erase "$(INTDIR)\mtextcontrol.pch"
 +	-@erase "$(INTDIR)\richeditutils.obj"
 +	-@erase "$(INTDIR)\services.obj"
 +	-@erase "$(INTDIR)\textcontrol.obj"
 +	-@erase "$(INTDIR)\textusers.obj"
 +	-@erase "$(INTDIR)\vc60.idb"
 +	-@erase "$(INTDIR)\vc60.pdb"
 +	-@erase "$(INTDIR)\version.res"
 +	-@erase "$(OUTDIR)\mtextcontrolW.dll"
 +	-@erase "$(OUTDIR)\mtextcontrolW.exp"
 +	-@erase "$(OUTDIR)\mtextcontrolW.ilk"
 +	-@erase "$(OUTDIR)\mtextcontrolW.pdb"
 +	-@erase "$(OUTDIR)\Obj\mtextcontrolW.map"
 +
 +"$(OUTDIR)" :
 +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 +
 +"$(INTDIR)" :
 +    if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
 +
 +CPP_PROJ=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
 +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\version.res" /d "_DEBUG" 
 +BSC32=bscmake.exe
 +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mtextcontrolW.bsc" 
 +BSC32_SBRS= \
 +	
 +LINK32=link.exe
 +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib riched20.lib /nologo /base:"0x25a20000" /dll /incremental:yes /pdb:"$(OUTDIR)\mtextcontrolW.pdb" /map:"$(INTDIR)\mtextcontrolW.map" /debug /machine:I386 /out:"$(OUTDIR)\mtextcontrolW.dll" /implib:"$(OUTDIR)\mtextcontrolW.lib" /pdbtype:sept 
 +LINK32_OBJS= \
 +	"$(INTDIR)\dataobject.obj" \
 +	"$(INTDIR)\enumformat.obj" \
 +	"$(INTDIR)\fancy_rtf.obj" \
 +	"$(INTDIR)\FormattedTextDraw.obj" \
 +	"$(INTDIR)\ImageDataObjectHlp.obj" \
 +	"$(INTDIR)\main.obj" \
 +	"$(INTDIR)\richeditutils.obj" \
 +	"$(INTDIR)\services.obj" \
 +	"$(INTDIR)\textcontrol.obj" \
 +	"$(INTDIR)\textusers.obj" \
 +	"$(INTDIR)\version.res"
 +
 +"$(OUTDIR)\mtextcontrolW.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
 +    $(LINK32) @<<
 +  $(LINK32_FLAGS) $(LINK32_OBJS)
 +<<
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +OUTDIR=.\Release_Unicode
 +INTDIR=.\Release_Unicode\Obj
 +# Begin Custom Macros
 +OutDir=.\Release_Unicode
 +# End Custom Macros
 +
 +ALL : "$(OUTDIR)\mtextcontrolW.dll"
 +
 +
 +CLEAN :
 +	-@erase "$(INTDIR)\dataobject.obj"
 +	-@erase "$(INTDIR)\enumformat.obj"
 +	-@erase "$(INTDIR)\fancy_rtf.obj"
 +	-@erase "$(INTDIR)\FormattedTextDraw.obj"
 +	-@erase "$(INTDIR)\ImageDataObjectHlp.obj"
 +	-@erase "$(INTDIR)\main.obj"
 +	-@erase "$(INTDIR)\mtextcontrol.pch"
 +	-@erase "$(INTDIR)\richeditutils.obj"
 +	-@erase "$(INTDIR)\services.obj"
 +	-@erase "$(INTDIR)\textcontrol.obj"
 +	-@erase "$(INTDIR)\textusers.obj"
 +	-@erase "$(INTDIR)\vc60.idb"
 +	-@erase "$(INTDIR)\vc60.pdb"
 +	-@erase "$(INTDIR)\version.res"
 +	-@erase "$(OUTDIR)\mtextcontrolW.dll"
 +	-@erase "$(OUTDIR)\mtextcontrolW.exp"
 +	-@erase "$(OUTDIR)\mtextcontrolW.pdb"
 +
 +"$(OUTDIR)" :
 +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 +
 +"$(INTDIR)" :
 +    if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
 +
 +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
 +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\version.res" /d "NDEBUG" 
 +BSC32=bscmake.exe
 +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mtextcontrolW.bsc" 
 +BSC32_SBRS= \
 +	
 +LINK32=link.exe
 +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib riched20.lib /nologo /base:"0x25a20000" /dll /incremental:no /pdb:"$(OUTDIR)\mtextcontrolW.pdb" /debug /machine:I386 /out:"$(OUTDIR)\mtextcontrolW.dll" /implib:"$(OUTDIR)\mtextcontrolW.lib" 
 +LINK32_OBJS= \
 +	"$(INTDIR)\dataobject.obj" \
 +	"$(INTDIR)\enumformat.obj" \
 +	"$(INTDIR)\fancy_rtf.obj" \
 +	"$(INTDIR)\FormattedTextDraw.obj" \
 +	"$(INTDIR)\ImageDataObjectHlp.obj" \
 +	"$(INTDIR)\main.obj" \
 +	"$(INTDIR)\richeditutils.obj" \
 +	"$(INTDIR)\services.obj" \
 +	"$(INTDIR)\textcontrol.obj" \
 +	"$(INTDIR)\textusers.obj" \
 +	"$(INTDIR)\version.res"
 +
 +"$(OUTDIR)\mtextcontrolW.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
 +    $(LINK32) @<<
 +  $(LINK32_FLAGS) $(LINK32_OBJS)
 +<<
 +
 +!ENDIF 
 +
 +.c{$(INTDIR)}.obj::
 +   $(CPP) @<<
 +   $(CPP_PROJ) $< 
 +<<
 +
 +.cpp{$(INTDIR)}.obj::
 +   $(CPP) @<<
 +   $(CPP_PROJ) $< 
 +<<
 +
 +.cxx{$(INTDIR)}.obj::
 +   $(CPP) @<<
 +   $(CPP_PROJ) $< 
 +<<
 +
 +.c{$(INTDIR)}.sbr::
 +   $(CPP) @<<
 +   $(CPP_PROJ) $< 
 +<<
 +
 +.cpp{$(INTDIR)}.sbr::
 +   $(CPP) @<<
 +   $(CPP_PROJ) $< 
 +<<
 +
 +.cxx{$(INTDIR)}.sbr::
 +   $(CPP) @<<
 +   $(CPP_PROJ) $< 
 +<<
 +
 +
 +!IF "$(NO_EXTERNAL_DEPS)" != "1"
 +!IF EXISTS("mtextcontrol.dep")
 +!INCLUDE "mtextcontrol.dep"
 +!ELSE 
 +!MESSAGE Warning: cannot find "mtextcontrol.dep"
 +!ENDIF 
 +!ENDIF 
 +
 +
 +!IF "$(CFG)" == "mtextcontrol - Win32 Release" || "$(CFG)" == "mtextcontrol - Win32 Debug" || "$(CFG)" == "mtextcontrol - Win32 Int Release" || "$(CFG)" == "mtextcontrol - Win32 Debug Unicode" || "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +SOURCE=.\src\dataobject.cpp
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\dataobject.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\dataobject.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\dataobject.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\dataobject.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\dataobject.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ENDIF 
 +
 +SOURCE=.\src\enumformat.cpp
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\enumformat.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\enumformat.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\enumformat.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\enumformat.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\enumformat.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ENDIF 
 +
 +SOURCE=.\src\fancy_rtf.cpp
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\fancy_rtf.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\fancy_rtf.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\fancy_rtf.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\fancy_rtf.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\fancy_rtf.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ENDIF 
 +
 +SOURCE=.\src\FormattedTextDraw.cpp
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\FormattedTextDraw.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\FormattedTextDraw.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\FormattedTextDraw.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\FormattedTextDraw.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\FormattedTextDraw.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ENDIF 
 +
 +SOURCE=.\src\ImageDataObjectHlp.cpp
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\ImageDataObjectHlp.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\ImageDataObjectHlp.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\ImageDataObjectHlp.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\ImageDataObjectHlp.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\ImageDataObjectHlp.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ENDIF 
 +
 +SOURCE=.\src\main.cpp
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yc"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\main.obj"	"$(INTDIR)\mtextcontrol.pch" : $(SOURCE) "$(INTDIR)"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yc"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\main.obj"	"$(INTDIR)\mtextcontrol.pch" : $(SOURCE) "$(INTDIR)"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yc"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\main.obj"	"$(INTDIR)\mtextcontrol.pch" : $(SOURCE) "$(INTDIR)"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yc"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\main.obj"	"$(INTDIR)\mtextcontrol.pch" : $(SOURCE) "$(INTDIR)"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yc"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\main.obj"	"$(INTDIR)\mtextcontrol.pch" : $(SOURCE) "$(INTDIR)"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ENDIF 
 +
 +SOURCE=.\src\richeditutils.cpp
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\richeditutils.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\richeditutils.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\richeditutils.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\richeditutils.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\richeditutils.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ENDIF 
 +
 +SOURCE=.\src\services.cpp
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\services.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\services.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\services.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\services.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\services.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ENDIF 
 +
 +SOURCE=.\src\textcontrol.cpp
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\textcontrol.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\textcontrol.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\textcontrol.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\textcontrol.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\textcontrol.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ENDIF 
 +
 +SOURCE=.\src\textusers.cpp
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\textusers.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\textusers.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /ZI /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\textusers.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +CPP_SWITCHES=/nologo /MTd /W3 /Gm /ZI /Od /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 +
 +"$(INTDIR)\textusers.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../include_API" /I "./api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "MTEXTCONTROL_EXPORTS" /Fp"$(INTDIR)\mtextcontrol.pch" /Yu"headers.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 +
 +"$(INTDIR)\textusers.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\mtextcontrol.pch"
 +	$(CPP) @<<
 +  $(CPP_SWITCHES) $(SOURCE)
 +<<
 +
 +
 +!ENDIF 
 +
 +SOURCE=.\res\version.rc
 +
 +!IF  "$(CFG)" == "mtextcontrol - Win32 Release"
 +
 +
 +"$(INTDIR)\version.res" : $(SOURCE) "$(INTDIR)"
 +	$(RSC) /l 0x409 /fo"$(INTDIR)\version.res" /i "res" /d "NDEBUG" $(SOURCE)
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug"
 +
 +
 +"$(INTDIR)\version.res" : $(SOURCE) "$(INTDIR)"
 +	$(RSC) /l 0x409 /fo"$(INTDIR)\version.res" /i "res" /d "_DEBUG" $(SOURCE)
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Int Release"
 +
 +
 +"$(INTDIR)\version.res" : $(SOURCE) "$(INTDIR)"
 +	$(RSC) /l 0x409 /fo"$(INTDIR)\version.res" /i "res" /d "NDEBUG" $(SOURCE)
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Debug Unicode"
 +
 +
 +"$(INTDIR)\version.res" : $(SOURCE) "$(INTDIR)"
 +	$(RSC) /l 0x409 /fo"$(INTDIR)\version.res" /i "res" /d "_DEBUG" $(SOURCE)
 +
 +
 +!ELSEIF  "$(CFG)" == "mtextcontrol - Win32 Release Unicode"
 +
 +
 +"$(INTDIR)\version.res" : $(SOURCE) "$(INTDIR)"
 +	$(RSC) /l 0x409 /fo"$(INTDIR)\version.res" /i "res" /d "NDEBUG" $(SOURCE)
 +
 +
 +!ENDIF 
 +
 +
 +!ENDIF 
 +
 diff --git a/mTextControl/mtextcontrol.opt b/mTextControl/mtextcontrol.opt Binary files differnew file mode 100644 index 0000000..8d4631f --- /dev/null +++ b/mTextControl/mtextcontrol.opt diff --git a/mTextControl/mtextcontrol_10.sln b/mTextControl/mtextcontrol_10.sln new file mode 100644 index 0000000..1c91b05 --- /dev/null +++ b/mTextControl/mtextcontrol_10.sln @@ -0,0 +1,26 @@ +
 +Microsoft Visual Studio Solution File, Format Version 11.00
 +# Visual C++ Express 2010
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mTextControl", "mtextcontrol_10.vcxproj", "{E26D2311-C164-48CF-BA24-5CEDA873D1B2}"
 +EndProject
 +Global
 +	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 +		Debug Unicode|Win32 = Debug Unicode|Win32
 +		Debug Unicode|x64 = Debug Unicode|x64
 +		Release Unicode|Win32 = Release Unicode|Win32
 +		Release Unicode|x64 = Release Unicode|x64
 +	EndGlobalSection
 +	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release Unicode|x64.Build.0 = Release Unicode|x64
 +	EndGlobalSection
 +	GlobalSection(SolutionProperties) = preSolution
 +		HideSolutionNode = FALSE
 +	EndGlobalSection
 +EndGlobal
 diff --git a/mTextControl/mtextcontrol_10.vcxproj b/mTextControl/mtextcontrol_10.vcxproj new file mode 100644 index 0000000..08d9edf --- /dev/null +++ b/mTextControl/mtextcontrol_10.vcxproj @@ -0,0 +1,311 @@ +<?xml version="1.0" encoding="utf-8"?>
 +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 +  <ItemGroup Label="ProjectConfigurations">
 +    <ProjectConfiguration Include="Debug Unicode|Win32">
 +      <Configuration>Debug Unicode</Configuration>
 +      <Platform>Win32</Platform>
 +    </ProjectConfiguration>
 +    <ProjectConfiguration Include="Debug Unicode|x64">
 +      <Configuration>Debug Unicode</Configuration>
 +      <Platform>x64</Platform>
 +    </ProjectConfiguration>
 +    <ProjectConfiguration Include="Release Unicode|Win32">
 +      <Configuration>Release Unicode</Configuration>
 +      <Platform>Win32</Platform>
 +    </ProjectConfiguration>
 +    <ProjectConfiguration Include="Release Unicode|x64">
 +      <Configuration>Release Unicode</Configuration>
 +      <Platform>x64</Platform>
 +    </ProjectConfiguration>
 +  </ItemGroup>
 +  <PropertyGroup Label="Globals">
 +    <ProjectName>mTextControl</ProjectName>
 +    <ProjectGuid>{E26D2311-C164-48CF-BA24-5CEDA873D1B2}</ProjectGuid>
 +    <RootNamespace>mtextcontrol</RootNamespace>
 +  </PropertyGroup>
 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
 +    <UseOfMfc>false</UseOfMfc>
 +    <CharacterSet>Unicode</CharacterSet>
 +  </PropertyGroup>
 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
 +    <UseOfMfc>false</UseOfMfc>
 +    <CharacterSet>Unicode</CharacterSet>
 +  </PropertyGroup>
 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
 +    <UseOfMfc>false</UseOfMfc>
 +    <CharacterSet>Unicode</CharacterSet>
 +  </PropertyGroup>
 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="Configuration">
 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
 +    <UseOfMfc>false</UseOfMfc>
 +    <CharacterSet>Unicode</CharacterSet>
 +  </PropertyGroup>
 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
 +  <ImportGroup Label="ExtensionSettings">
 +  </ImportGroup>
 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="PropertySheets">
 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 +  </ImportGroup>
 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="PropertySheets">
 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 +  </ImportGroup>
 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="PropertySheets">
 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 +  </ImportGroup>
 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="PropertySheets">
 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 +  </ImportGroup>
 +  <PropertyGroup Label="UserMacros" />
 +  <PropertyGroup>
 +    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
 +    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">true</IgnoreImportLibrary>
 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
 +    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">true</IgnoreImportLibrary>
 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
 +    <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)%3b$(ProjectDir)$(TargetName).*</ExtensionsToDeleteOnClean>
 +    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">true</IgnoreImportLibrary>
 +    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">true</LinkIncremental>
 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
 +    <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)%3b$(ProjectDir)$(TargetName).*</ExtensionsToDeleteOnClean>
 +    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">true</IgnoreImportLibrary>
 +    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">false</LinkIncremental>
 +    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
 +    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
 +    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
 +    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
 +    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
 +    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
 +    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
 +    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
 +    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
 +    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
 +    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
 +    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
 +    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(ProjectName)W</TargetName>
 +    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(ProjectName)W</TargetName>
 +  </PropertyGroup>
 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
 +    <Midl>
 +      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <MkTypLibCompatible>true</MkTypLibCompatible>
 +      <SuppressStartupBanner>true</SuppressStartupBanner>
 +      <TargetEnvironment>Win32</TargetEnvironment>
 +      <TypeLibraryName>d:\_miranda.izv\plugins/mtextcontrol_9.tlb</TypeLibraryName>
 +      <HeaderFileName>
 +      </HeaderFileName>
 +    </Midl>
 +    <ClCompile>
 +      <Optimization>Disabled</Optimization>
 +      <AdditionalIncludeDirectories>../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 +      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;UNICODE;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <MinimalRebuild>true</MinimalRebuild>
 +      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
 +      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
 +      <PrecompiledHeader>Use</PrecompiledHeader>
 +      <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
 +      <BrowseInformationFile>
 +      </BrowseInformationFile>
 +      <WarningLevel>Level3</WarningLevel>
 +      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
 +    </ClCompile>
 +    <ResourceCompile>
 +      <PreprocessorDefinitions>_DEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +    </ResourceCompile>
 +    <PreLinkEvent>
 +      <Command>
 +      </Command>
 +    </PreLinkEvent>
 +    <Link>
 +      <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
 +      <GenerateDebugInformation>true</GenerateDebugInformation>
 +      <BaseAddress>0x25a20000</BaseAddress>
 +      <RandomizedBaseAddress>false</RandomizedBaseAddress>
 +      <DataExecutionPrevention>
 +      </DataExecutionPrevention>
 +      <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
 +      <TargetMachine>MachineX86</TargetMachine>
 +    </Link>
 +  </ItemDefinitionGroup>
 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
 +    <Midl>
 +      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <MkTypLibCompatible>true</MkTypLibCompatible>
 +      <SuppressStartupBanner>true</SuppressStartupBanner>
 +      <TargetEnvironment>Win32</TargetEnvironment>
 +      <TypeLibraryName>.\mtextcontrol___Win32_Release_Unicode/mtextcontrol_9.tlb</TypeLibraryName>
 +      <HeaderFileName>
 +      </HeaderFileName>
 +    </Midl>
 +    <ClCompile>
 +      <Optimization>MaxSpeed</Optimization>
 +      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
 +      <AdditionalIncludeDirectories>../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 +      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;UNICODE;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <StringPooling>true</StringPooling>
 +      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
 +      <FunctionLevelLinking>true</FunctionLevelLinking>
 +      <PrecompiledHeader>Use</PrecompiledHeader>
 +      <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
 +      <WarningLevel>Level3</WarningLevel>
 +      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
 +      <BrowseInformationFile>
 +      </BrowseInformationFile>
 +    </ClCompile>
 +    <ResourceCompile>
 +      <PreprocessorDefinitions>NDEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +    </ResourceCompile>
 +    <Link>
 +      <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
 +      <BaseAddress>0x25a20000</BaseAddress>
 +      <RandomizedBaseAddress>false</RandomizedBaseAddress>
 +      <DataExecutionPrevention>
 +      </DataExecutionPrevention>
 +      <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
 +      <TargetMachine>MachineX86</TargetMachine>
 +      <ProgramDatabaseFile>
 +      </ProgramDatabaseFile>
 +    </Link>
 +  </ItemDefinitionGroup>
 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
 +    <Midl>
 +      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <MkTypLibCompatible>true</MkTypLibCompatible>
 +      <SuppressStartupBanner>true</SuppressStartupBanner>
 +      <TargetEnvironment>X64</TargetEnvironment>
 +      <TypeLibraryName>d:\_miranda.izv\plugins/mtextcontrol_9.tlb</TypeLibraryName>
 +      <HeaderFileName>
 +      </HeaderFileName>
 +    </Midl>
 +    <ClCompile>
 +      <Optimization>Disabled</Optimization>
 +      <AdditionalIncludeDirectories>../../include;../../include_API;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 +      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;UNICODE;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <MinimalRebuild>true</MinimalRebuild>
 +      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
 +      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
 +      <PrecompiledHeader>Use</PrecompiledHeader>
 +      <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
 +      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
 +      <ObjectFileName>$(IntDir)</ObjectFileName>
 +      <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
 +      <BrowseInformationFile>$(IntDir)</BrowseInformationFile>
 +      <WarningLevel>Level3</WarningLevel>
 +      <SuppressStartupBanner>true</SuppressStartupBanner>
 +      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
 +    </ClCompile>
 +    <ResourceCompile>
 +      <PreprocessorDefinitions>_DEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <Culture>0x0409</Culture>
 +    </ResourceCompile>
 +    <PreLinkEvent>
 +      <Command>
 +      </Command>
 +    </PreLinkEvent>
 +    <Link>
 +      <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
 +      <OutputFile>$(OutDir)$(ProjectName)W.dll</OutputFile>
 +      <SuppressStartupBanner>true</SuppressStartupBanner>
 +      <GenerateDebugInformation>true</GenerateDebugInformation>
 +      <GenerateMapFile>true</GenerateMapFile>
 +      <MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
 +      <BaseAddress>0x25a20000</BaseAddress>
 +      <RandomizedBaseAddress>false</RandomizedBaseAddress>
 +      <DataExecutionPrevention>
 +      </DataExecutionPrevention>
 +      <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
 +      <TargetMachine>MachineX64</TargetMachine>
 +    </Link>
 +  </ItemDefinitionGroup>
 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
 +    <Midl>
 +      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <MkTypLibCompatible>true</MkTypLibCompatible>
 +      <SuppressStartupBanner>true</SuppressStartupBanner>
 +      <TargetEnvironment>X64</TargetEnvironment>
 +      <TypeLibraryName>.\mtextcontrol___Win32_Release_Unicode/mtextcontrol_9.tlb</TypeLibraryName>
 +      <HeaderFileName>
 +      </HeaderFileName>
 +    </Midl>
 +    <ClCompile>
 +      <Optimization>MaxSpeed</Optimization>
 +      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
 +      <AdditionalIncludeDirectories>../../include;../../include_API;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 +      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;UNICODE;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <StringPooling>true</StringPooling>
 +      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
 +      <FunctionLevelLinking>true</FunctionLevelLinking>
 +      <PrecompiledHeader>Use</PrecompiledHeader>
 +      <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
 +      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
 +      <ObjectFileName>$(IntDir)</ObjectFileName>
 +      <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
 +      <WarningLevel>Level3</WarningLevel>
 +      <SuppressStartupBanner>true</SuppressStartupBanner>
 +      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
 +    </ClCompile>
 +    <ResourceCompile>
 +      <PreprocessorDefinitions>NDEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <Culture>0x0409</Culture>
 +    </ResourceCompile>
 +    <Link>
 +      <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
 +      <OutputFile>$(OutDir)$(ProjectName)W.dll</OutputFile>
 +      <SuppressStartupBanner>true</SuppressStartupBanner>
 +      <GenerateDebugInformation>true</GenerateDebugInformation>
 +      <MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
 +      <BaseAddress>0x25a20000</BaseAddress>
 +      <RandomizedBaseAddress>false</RandomizedBaseAddress>
 +      <DataExecutionPrevention>
 +      </DataExecutionPrevention>
 +      <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
 +      <TargetMachine>MachineX64</TargetMachine>
 +    </Link>
 +  </ItemDefinitionGroup>
 +  <ItemGroup>
 +    <ClCompile Include="src\dataobject.cpp" />
 +    <ClCompile Include="src\enumformat.cpp" />
 +    <ClCompile Include="src\fancy_rtf.cpp" />
 +    <ClCompile Include="src\FormattedTextDraw.cpp" />
 +    <ClCompile Include="src\ImageDataObjectHlp.cpp" />
 +    <ClCompile Include="src\main.cpp">
 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">Create</PrecompiledHeader>
 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">Create</PrecompiledHeader>
 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">Create</PrecompiledHeader>
 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">Create</PrecompiledHeader>
 +    </ClCompile>
 +    <ClCompile Include="src\richeditutils.cpp" />
 +    <ClCompile Include="src\services.cpp" />
 +    <ClCompile Include="src\textcontrol.cpp" />
 +    <ClCompile Include="src\textusers.cpp" />
 +  </ItemGroup>
 +  <ItemGroup>
 +    <ClInclude Include="src\fancy_rtf.h" />
 +    <ClInclude Include="src\FormattedTextDraw.h" />
 +    <ClInclude Include="src\headers.h" />
 +    <ClInclude Include="src\ImageDataObjectHlp.h" />
 +    <ClInclude Include="src\richeditutils.h" />
 +    <ClInclude Include="src\services.h" />
 +    <ClInclude Include="src\textcontrol.h" />
 +    <ClInclude Include="src\textusers.h" />
 +    <ClInclude Include="api\m_text.h" />
 +    <ClInclude Include="src\version.h" />
 +  </ItemGroup>
 +  <ItemGroup>
 +    <ResourceCompile Include="res\version.rc" />
 +  </ItemGroup>
 +  <ItemGroup>
 +    <None Include="Changelog.txt" />
 +  </ItemGroup>
 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
 +  <ImportGroup Label="ExtensionTargets">
 +  </ImportGroup>
 +</Project>
\ No newline at end of file diff --git a/mTextControl/mtextcontrol_10.vcxproj.filters b/mTextControl/mtextcontrol_10.vcxproj.filters new file mode 100644 index 0000000..dfaa669 --- /dev/null +++ b/mTextControl/mtextcontrol_10.vcxproj.filters @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="utf-8"?>
 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 +  <ItemGroup>
 +    <Filter Include="Source Files">
 +      <UniqueIdentifier>{2ba6b395-db86-4c21-bd99-960dd8ae399a}</UniqueIdentifier>
 +      <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
 +    </Filter>
 +    <Filter Include="Header Files">
 +      <UniqueIdentifier>{638b774c-2eb7-43db-a58a-f1eb0659fee9}</UniqueIdentifier>
 +      <Extensions>h;hpp;hxx;hm;inl</Extensions>
 +    </Filter>
 +    <Filter Include="api">
 +      <UniqueIdentifier>{c21f5cc4-1e66-4a27-971e-ef61a416298b}</UniqueIdentifier>
 +    </Filter>
 +    <Filter Include="Resource Files">
 +      <UniqueIdentifier>{cc11ab2b-a14e-4f67-8b7a-72d64c4aa033}</UniqueIdentifier>
 +      <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
 +    </Filter>
 +  </ItemGroup>
 +  <ItemGroup>
 +    <ClCompile Include="src\dataobject.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="src\enumformat.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="src\fancy_rtf.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="src\FormattedTextDraw.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="src\ImageDataObjectHlp.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="src\main.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="src\richeditutils.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="src\services.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="src\textcontrol.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="src\textusers.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +  </ItemGroup>
 +  <ItemGroup>
 +    <ClInclude Include="src\fancy_rtf.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="src\FormattedTextDraw.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="src\headers.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="src\ImageDataObjectHlp.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="src\richeditutils.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="src\services.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="src\textcontrol.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="src\textusers.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="api\m_text.h">
 +      <Filter>api</Filter>
 +    </ClInclude>
 +    <ClInclude Include="src\version.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +  </ItemGroup>
 +  <ItemGroup>
 +    <ResourceCompile Include="res\version.rc">
 +      <Filter>Resource Files</Filter>
 +    </ResourceCompile>
 +  </ItemGroup>
 +  <ItemGroup>
 +    <None Include="Changelog.txt" />
 +  </ItemGroup>
 +</Project>
\ No newline at end of file diff --git a/mTextControl/mtextcontrol_9.sln b/mTextControl/mtextcontrol_9.sln new file mode 100644 index 0000000..36da2cf --- /dev/null +++ b/mTextControl/mtextcontrol_9.sln @@ -0,0 +1,20 @@ +
 +Microsoft Visual Studio Solution File, Format Version 10.00
 +# Visual C++ Express 2008
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mTextControl", "mtextcontrol_9.vcproj", "{E26D2311-C164-48CF-BA24-5CEDA873D1B2}"
 +EndProject
 +Global
 +	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 +		Debug Unicode|Win32 = Debug Unicode|Win32
 +		Release Unicode|Win32 = Release Unicode|Win32
 +	EndGlobalSection
 +	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
 +		{E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
 +	EndGlobalSection
 +	GlobalSection(SolutionProperties) = preSolution
 +		HideSolutionNode = FALSE
 +	EndGlobalSection
 +EndGlobal
 diff --git a/mTextControl/mtextcontrol_9.vcproj b/mTextControl/mtextcontrol_9.vcproj new file mode 100644 index 0000000..96402ff --- /dev/null +++ b/mTextControl/mtextcontrol_9.vcproj @@ -0,0 +1,539 @@ +<?xml version="1.0" encoding="Windows-1252"?>
 +<VisualStudioProject
 +	ProjectType="Visual C++"
 +	Version="9,00"
 +	Name="mTextControl"
 +	ProjectGUID="{E26D2311-C164-48CF-BA24-5CEDA873D1B2}"
 +	RootNamespace="mtextcontrol"
 +	TargetFrameworkVersion="0"
 +	>
 +	<Platforms>
 +		<Platform
 +			Name="Win32"
 +		/>
 +		<Platform
 +			Name="x64"
 +		/>
 +	</Platforms>
 +	<ToolFiles>
 +	</ToolFiles>
 +	<Configurations>
 +		<Configuration
 +			Name="Debug Unicode|Win32"
 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins\"
 +			IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)\"
 +			ConfigurationType="2"
 +			UseOfMFC="0"
 +			ATLMinimizesCRunTimeLibraryUsage="false"
 +			CharacterSet="1"
 +			>
 +			<Tool
 +				Name="VCPreBuildEventTool"
 +			/>
 +			<Tool
 +				Name="VCCustomBuildTool"
 +			/>
 +			<Tool
 +				Name="VCXMLDataGeneratorTool"
 +			/>
 +			<Tool
 +				Name="VCWebServiceProxyGeneratorTool"
 +			/>
 +			<Tool
 +				Name="VCMIDLTool"
 +				PreprocessorDefinitions="_DEBUG"
 +				MkTypLibCompatible="true"
 +				SuppressStartupBanner="true"
 +				TargetEnvironment="1"
 +				TypeLibraryName="d:\_miranda.izv\plugins/mtextcontrol_9.tlb"
 +				HeaderFileName=""
 +			/>
 +			<Tool
 +				Name="VCCLCompilerTool"
 +				Optimization="0"
 +				AdditionalIncludeDirectories="../../include;../../ExternalAPI"
 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_UNICODE;UNICODE;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS"
 +				MinimalRebuild="true"
 +				BasicRuntimeChecks="3"
 +				RuntimeLibrary="1"
 +				UsePrecompiledHeader="2"
 +				PrecompiledHeaderThrough="headers.h"
 +				BrowseInformationFile=""
 +				WarningLevel="3"
 +				DebugInformationFormat="4"
 +			/>
 +			<Tool
 +				Name="VCManagedResourceCompilerTool"
 +			/>
 +			<Tool
 +				Name="VCResourceCompilerTool"
 +				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE"
 +			/>
 +			<Tool
 +				Name="VCPreLinkEventTool"
 +				CommandLine=""
 +			/>
 +			<Tool
 +				Name="VCLinkerTool"
 +				IgnoreImportLibrary="true"
 +				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
 +				OutputFile="$(OutDir)\$(ProjectName)W.dll"
 +				GenerateDebugInformation="true"
 +				BaseAddress="0x25a20000"
 +				RandomizedBaseAddress="1"
 +				DataExecutionPrevention="0"
 +				ImportLibrary="$(IntDir)/$(TargetName).lib"
 +				TargetMachine="1"
 +			/>
 +			<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 Unicode|Win32"
 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins\"
 +			IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)\"
 +			ConfigurationType="2"
 +			UseOfMFC="0"
 +			ATLMinimizesCRunTimeLibraryUsage="false"
 +			CharacterSet="1"
 +			>
 +			<Tool
 +				Name="VCPreBuildEventTool"
 +			/>
 +			<Tool
 +				Name="VCCustomBuildTool"
 +			/>
 +			<Tool
 +				Name="VCXMLDataGeneratorTool"
 +			/>
 +			<Tool
 +				Name="VCWebServiceProxyGeneratorTool"
 +			/>
 +			<Tool
 +				Name="VCMIDLTool"
 +				PreprocessorDefinitions="NDEBUG"
 +				MkTypLibCompatible="true"
 +				SuppressStartupBanner="true"
 +				TargetEnvironment="1"
 +				TypeLibraryName=".\mtextcontrol___Win32_Release_Unicode/mtextcontrol_9.tlb"
 +				HeaderFileName=""
 +			/>
 +			<Tool
 +				Name="VCCLCompilerTool"
 +				Optimization="2"
 +				InlineFunctionExpansion="1"
 +				AdditionalIncludeDirectories="../../include;../../ExternalAPI"
 +				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_UNICODE;UNICODE;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS"
 +				StringPooling="true"
 +				RuntimeLibrary="0"
 +				EnableFunctionLevelLinking="true"
 +				UsePrecompiledHeader="2"
 +				PrecompiledHeaderThrough="headers.h"
 +				WarningLevel="3"
 +				DebugInformationFormat="3"
 +			/>
 +			<Tool
 +				Name="VCManagedResourceCompilerTool"
 +			/>
 +			<Tool
 +				Name="VCResourceCompilerTool"
 +				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE"
 +			/>
 +			<Tool
 +				Name="VCPreLinkEventTool"
 +			/>
 +			<Tool
 +				Name="VCLinkerTool"
 +				IgnoreImportLibrary="true"
 +				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
 +				OutputFile="$(OutDir)\$(ProjectName)W.dll"
 +				BaseAddress="0x25a20000"
 +				RandomizedBaseAddress="1"
 +				DataExecutionPrevention="0"
 +				ImportLibrary="$(IntDir)/$(TargetName).lib"
 +				TargetMachine="1"
 +			/>
 +			<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 Unicode|x64"
 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)64/Plugins"
 +			IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)"
 +			ConfigurationType="2"
 +			UseOfMFC="0"
 +			ATLMinimizesCRunTimeLibraryUsage="false"
 +			CharacterSet="1"
 +			DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath);$(ProjectDir)$(TargetName).*"
 +			>
 +			<Tool
 +				Name="VCPreBuildEventTool"
 +			/>
 +			<Tool
 +				Name="VCCustomBuildTool"
 +			/>
 +			<Tool
 +				Name="VCXMLDataGeneratorTool"
 +			/>
 +			<Tool
 +				Name="VCWebServiceProxyGeneratorTool"
 +			/>
 +			<Tool
 +				Name="VCMIDLTool"
 +				PreprocessorDefinitions="_DEBUG"
 +				MkTypLibCompatible="true"
 +				SuppressStartupBanner="true"
 +				TargetEnvironment="3"
 +				TypeLibraryName="d:\_miranda.izv\plugins/mtextcontrol_9.tlb"
 +				HeaderFileName=""
 +			/>
 +			<Tool
 +				Name="VCCLCompilerTool"
 +				Optimization="0"
 +				AdditionalIncludeDirectories="../../include;../../include_API"
 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_UNICODE;UNICODE;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS"
 +				MinimalRebuild="true"
 +				BasicRuntimeChecks="3"
 +				RuntimeLibrary="3"
 +				UsePrecompiledHeader="2"
 +				PrecompiledHeaderThrough="headers.h"
 +				AssemblerListingLocation="$(IntDir)/"
 +				ObjectFile="$(IntDir)/"
 +				ProgramDataBaseFileName="$(IntDir)/"
 +				BrowseInformationFile="$(IntDir)/"
 +				WarningLevel="3"
 +				SuppressStartupBanner="true"
 +				DebugInformationFormat="3"
 +			/>
 +			<Tool
 +				Name="VCManagedResourceCompilerTool"
 +			/>
 +			<Tool
 +				Name="VCResourceCompilerTool"
 +				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE"
 +				Culture="1033"
 +			/>
 +			<Tool
 +				Name="VCPreLinkEventTool"
 +				CommandLine=""
 +			/>
 +			<Tool
 +				Name="VCLinkerTool"
 +				IgnoreImportLibrary="true"
 +				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
 +				OutputFile="$(OutDir)\$(ProjectName)W.dll"
 +				LinkIncremental="2"
 +				SuppressStartupBanner="true"
 +				GenerateDebugInformation="true"
 +				GenerateMapFile="true"
 +				MapFileName="$(TargetDir)$(TargetName).map"
 +				BaseAddress="0x25a20000"
 +				RandomizedBaseAddress="1"
 +				DataExecutionPrevention="0"
 +				ImportLibrary="$(IntDir)/$(TargetName).lib"
 +				TargetMachine="17"
 +			/>
 +			<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 Unicode|x64"
 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)64/Plugins"
 +			IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)"
 +			ConfigurationType="2"
 +			UseOfMFC="0"
 +			ATLMinimizesCRunTimeLibraryUsage="false"
 +			CharacterSet="1"
 +			DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath);$(ProjectDir)$(TargetName).*"
 +			>
 +			<Tool
 +				Name="VCPreBuildEventTool"
 +			/>
 +			<Tool
 +				Name="VCCustomBuildTool"
 +			/>
 +			<Tool
 +				Name="VCXMLDataGeneratorTool"
 +			/>
 +			<Tool
 +				Name="VCWebServiceProxyGeneratorTool"
 +			/>
 +			<Tool
 +				Name="VCMIDLTool"
 +				PreprocessorDefinitions="NDEBUG"
 +				MkTypLibCompatible="true"
 +				SuppressStartupBanner="true"
 +				TargetEnvironment="3"
 +				TypeLibraryName=".\mtextcontrol___Win32_Release_Unicode/mtextcontrol_9.tlb"
 +				HeaderFileName=""
 +			/>
 +			<Tool
 +				Name="VCCLCompilerTool"
 +				Optimization="2"
 +				InlineFunctionExpansion="1"
 +				AdditionalIncludeDirectories="../../include;../../include_API"
 +				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_UNICODE;UNICODE;_USRDLL;MTEXTCONTROL_EXPORTS;MTEXT_NOHELPERS"
 +				StringPooling="true"
 +				RuntimeLibrary="2"
 +				EnableFunctionLevelLinking="true"
 +				UsePrecompiledHeader="2"
 +				PrecompiledHeaderThrough="headers.h"
 +				AssemblerListingLocation="$(IntDir)/"
 +				ObjectFile="$(IntDir)/"
 +				ProgramDataBaseFileName="$(IntDir)/"
 +				WarningLevel="3"
 +				SuppressStartupBanner="true"
 +				DebugInformationFormat="3"
 +			/>
 +			<Tool
 +				Name="VCManagedResourceCompilerTool"
 +			/>
 +			<Tool
 +				Name="VCResourceCompilerTool"
 +				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE"
 +				Culture="1033"
 +			/>
 +			<Tool
 +				Name="VCPreLinkEventTool"
 +			/>
 +			<Tool
 +				Name="VCLinkerTool"
 +				IgnoreImportLibrary="true"
 +				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
 +				OutputFile="$(OutDir)\$(ProjectName)W.dll"
 +				LinkIncremental="1"
 +				SuppressStartupBanner="true"
 +				GenerateDebugInformation="true"
 +				MapFileName="$(TargetDir)$(TargetName).map"
 +				BaseAddress="0x25a20000"
 +				RandomizedBaseAddress="1"
 +				DataExecutionPrevention="0"
 +				ImportLibrary="$(IntDir)/$(TargetName).lib"
 +				TargetMachine="17"
 +			/>
 +			<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="src\dataobject.cpp"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\enumformat.cpp"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\fancy_rtf.cpp"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\FormattedTextDraw.cpp"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\ImageDataObjectHlp.cpp"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\main.cpp"
 +				>
 +				<FileConfiguration
 +					Name="Debug Unicode|Win32"
 +					>
 +					<Tool
 +						Name="VCCLCompilerTool"
 +						UsePrecompiledHeader="1"
 +					/>
 +				</FileConfiguration>
 +				<FileConfiguration
 +					Name="Release Unicode|Win32"
 +					>
 +					<Tool
 +						Name="VCCLCompilerTool"
 +						UsePrecompiledHeader="1"
 +					/>
 +				</FileConfiguration>
 +				<FileConfiguration
 +					Name="Debug Unicode|x64"
 +					>
 +					<Tool
 +						Name="VCCLCompilerTool"
 +						UsePrecompiledHeader="1"
 +					/>
 +				</FileConfiguration>
 +				<FileConfiguration
 +					Name="Release Unicode|x64"
 +					>
 +					<Tool
 +						Name="VCCLCompilerTool"
 +						UsePrecompiledHeader="1"
 +					/>
 +				</FileConfiguration>
 +			</File>
 +			<File
 +				RelativePath="src\richeditutils.cpp"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\services.cpp"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\textcontrol.cpp"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\textusers.cpp"
 +				>
 +			</File>
 +		</Filter>
 +		<Filter
 +			Name="Header Files"
 +			Filter="h;hpp;hxx;hm;inl"
 +			>
 +			<File
 +				RelativePath="src\fancy_rtf.h"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\FormattedTextDraw.h"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\headers.h"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\ImageDataObjectHlp.h"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\richeditutils.h"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\services.h"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\textcontrol.h"
 +				>
 +			</File>
 +			<File
 +				RelativePath="src\textusers.h"
 +				>
 +			</File>
 +		</Filter>
 +		<Filter
 +			Name="api"
 +			>
 +			<File
 +				RelativePath="api\m_text.h"
 +				>
 +			</File>
 +		</Filter>
 +		<Filter
 +			Name="Resource Files"
 +			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
 +			>
 +			<File
 +				RelativePath=".\res\version.rc"
 +				>
 +			</File>
 +		</Filter>
 +		<File
 +			RelativePath=".\Changelog.txt"
 +			>
 +		</File>
 +		<File
 +			RelativePath=".\src\version.h"
 +			>
 +		</File>
 +	</Files>
 +	<Globals>
 +	</Globals>
 +</VisualStudioProject>
 diff --git a/mTextControl/res/version.rc b/mTextControl/res/version.rc new file mode 100644 index 0000000..8532233 --- /dev/null +++ b/mTextControl/res/version.rc @@ -0,0 +1,40 @@ +#include <windows.h> // include for version info constants
 +#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
 +#ifdef _DEBUG
 + FILEFLAGS 0x21L
 +#else
 + FILEFLAGS 0x20L
 +#endif
 + FILEOS 0x4L
 + FILETYPE 0x2L
 + FILESUBTYPE 0x0L
 +BEGIN
 +    BLOCK "StringFileInfo"
 +    BEGIN
 +        BLOCK "000004b0"
 +        BEGIN
 +            VALUE "Comments", MTEXT_DESCRIPTION
 +            VALUE "CompanyName", "Miranda IM"
 +            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 "Translation", 0x0, 1200
 +    END
 +END
 +
 diff --git a/mTextControl/src/FormattedTextDraw.cpp b/mTextControl/src/FormattedTextDraw.cpp new file mode 100644 index 0000000..0762e77 --- /dev/null +++ b/mTextControl/src/FormattedTextDraw.cpp @@ -0,0 +1,551 @@ +// Feel free to use this code in your own applications.
 +// The Author does not guarantee anything about this code.
 +// Author : Yves Maurer
 +
 +// FormattedTextDraw.cpp : Implementation of CFormattedTextDraw
 +
 +#include "headers.h"
 +
 +
 +const IID IID_ITextServices = { // 8d33f740-cf58-11ce-a89d-00aa006cadc5
 +    0x8d33f740,
 +    0xcf58,
 +    0x11ce,
 +    {0xa8, 0x9d, 0x00, 0xaa, 0x00, 0x6c, 0xad, 0xc5}
 +  };
 +
 +const IID IID_ITextHost = { // c5bdd8d0-d26e-11ce-a89e-00aa006cadc5
 +    0xc5bdd8d0,
 +    0xd26e,
 +    0x11ce,
 +    {0xa8, 0x9e, 0x00, 0xaa, 0x00, 0x6c, 0xad, 0xc5}
 +  };
 +
 +static const IID IID_ITextDocument = {
 +	0x8CC497C0,
 +	0xA1DF,
 +	0x11CE,
 +	{0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D}
 +  };
 +
 +/////////////////////////////////////////////////////////////////////////////
 +// CallBack functions
 +DWORD CALLBACK EditStreamInCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
 +{
 +	PCOOKIE pCookie = (PCOOKIE) dwCookie;
 +	if (pCookie->isUnicode)
 +	{
 +		if((pCookie->dwSize - pCookie->dwCount)*sizeof(WCHAR) < (DWORD)cb)
 +			*pcb = (pCookie->dwSize - pCookie->dwCount)*sizeof(WCHAR);
 +		else
 +			*pcb = cb&~1UL;
 +		CopyMemory(pbBuff, pCookie->unicode+pCookie->dwCount, *pcb);
 +		pCookie->dwCount += *pcb/sizeof(WCHAR);
 +	} else
 +	{
 +		if(pCookie->dwSize - pCookie->dwCount < (DWORD)cb)
 +			*pcb = pCookie->dwSize - pCookie->dwCount;
 +		else
 +			*pcb = cb;
 +		CopyMemory(pbBuff, pCookie->ansi+pCookie->dwCount, *pcb);
 +		pCookie->dwCount += *pcb;
 +	}
 +
 +	return 0;	//	callback succeeded - no errors
 +}
 +
 +/////////////////////////////////////////////////////////////////////////////
 +// CFormattedTextDraw
 +HRESULT CFormattedTextDraw::putRTFTextA(char *newVal)
 +{
 +	HRESULT hr;
 +	LRESULT lResult = 0;
 +	EDITSTREAM editStream;
 +
 +	if (!m_spTextServices) 
 +		return S_FALSE;
 +
 +	m_editCookie.isUnicode = false;
 +	m_editCookie.ansi = newVal;
 +	m_editCookie.dwSize = lstrlenA(m_editCookie.ansi);
 +	m_editCookie.dwCount = 0;
 +	editStream.dwCookie = (DWORD_PTR) &m_editCookie;
 +	editStream.dwError = 0;
 +	editStream.pfnCallback = (EDITSTREAMCALLBACK)EditStreamInCallback;
 +	hr = m_spTextServices->TxSendMessage(EM_STREAMIN, (WPARAM)(SF_RTF), (LPARAM)&editStream, &lResult);
 +	return S_OK;
 +}
 +
 +HRESULT CFormattedTextDraw::putRTFTextW(WCHAR *newVal)
 +{
 +#ifdef UNICODE
 +	HRESULT hr;
 +	LRESULT lResult = 0;
 +	EDITSTREAM editStream;
 +
 +	if (!m_spTextServices) 
 +		return S_FALSE;
 +
 +	m_editCookie.isUnicode = true;
 +	m_editCookie.unicode = newVal;
 +	m_editCookie.dwSize = lstrlenW(m_editCookie.unicode);
 +	m_editCookie.dwCount = 0;
 +	editStream.dwCookie = (DWORD_PTR) &m_editCookie;
 +	editStream.dwError = 0;
 +	editStream.pfnCallback = (EDITSTREAMCALLBACK)EditStreamInCallback;
 +	hr = m_spTextServices->TxSendMessage(EM_STREAMIN, (WPARAM)(SF_RTF|SF_UNICODE), (LPARAM)&editStream, &lResult);
 +	return S_OK;
 +#else
 +	return E_FAIL;
 +#endif
 +}
 +
 +HRESULT CFormattedTextDraw::putTextA(char *newVal)
 +{
 +	HRESULT hr;
 +	LRESULT lResult = 0;
 +	EDITSTREAM editStream;
 +
 +	if (!m_spTextServices) 
 +		return S_FALSE;
 +
 +	m_editCookie.isUnicode = false;
 +	m_editCookie.ansi = newVal;
 +	m_editCookie.dwSize = lstrlenA(m_editCookie.ansi);
 +	m_editCookie.dwCount = 0;
 +	editStream.dwCookie = (DWORD_PTR) &m_editCookie;
 +	editStream.dwError = 0;
 +	editStream.pfnCallback = (EDITSTREAMCALLBACK)EditStreamInCallback;
 +	hr = m_spTextServices->TxSendMessage(EM_STREAMIN, (WPARAM)(SF_TEXT), (LPARAM)&editStream, &lResult);
 +	
 +	CHARFORMAT cf;
 +	cf.cbSize = sizeof(cf);
 +	cf.dwMask = CFM_FACE|CFM_BOLD;
 +	cf.dwEffects = 0;
 +	wsprintf(cf.szFaceName, _T("MS Shell Dlg"));
 +	m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult);
 +
 +	return S_OK;
 +}
 +
 +HRESULT CFormattedTextDraw::putTextW(WCHAR *newVal)
 +{
 +#ifdef UNICODE
 +	HRESULT hr;
 +	LRESULT lResult = 0;
 +	EDITSTREAM editStream;
 +
 +	if (!m_spTextServices) 
 +		return S_FALSE;
 +
 +	m_editCookie.isUnicode = true;
 +	m_editCookie.unicode = newVal;
 +	m_editCookie.dwSize = lstrlenW(m_editCookie.unicode);
 +	m_editCookie.dwCount = 0;
 +	editStream.dwCookie = (DWORD_PTR) &m_editCookie;
 +	editStream.dwError = 0;
 +	editStream.pfnCallback = (EDITSTREAMCALLBACK)EditStreamInCallback;
 +	hr = m_spTextServices->TxSendMessage(EM_STREAMIN, (WPARAM)(SF_TEXT|SF_UNICODE), (LPARAM)&editStream, &lResult);
 +	
 +	CHARFORMAT cf;
 +	cf.cbSize = sizeof(cf);
 +	cf.dwMask = CFM_FACE|CFM_BOLD;
 +	cf.dwEffects = 0;
 +	wsprintf(cf.szFaceName, _T("MS Shell Dlg"));
 +	m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult);
 +
 +	return S_OK;
 +#else
 +	return E_FAIL;
 +#endif
 +}
 +
 +HRESULT CFormattedTextDraw::Draw(void *hdcDraw, RECT *prc)
 +{
 +	LOGFONT lf;
 +	GetObject(GetCurrentObject((HDC)hdcDraw, OBJ_FONT), sizeof(lf), &lf);
 +
 +	LRESULT lResult;
 +	CHARFORMAT cf;
 +	cf.cbSize = sizeof(cf);
 +	cf.dwMask = CFM_FACE/*|CFM_COLOR*/|CFM_CHARSET|CFM_SIZE|
 +		(lf.lfWeight>=FW_BOLD?CFM_BOLD:0)|
 +		(lf.lfItalic?CFM_ITALIC:0)|
 +		(lf.lfUnderline?CFM_UNDERLINE:0)|
 +		(lf.lfStrikeOut?CFM_STRIKEOUT:0);
 +	cf.dwEffects = CFE_BOLD|CFE_ITALIC|CFE_STRIKEOUT|CFE_UNDERLINE;
 +	cf.crTextColor = GetTextColor((HDC)hdcDraw);
 +	cf.bCharSet = lf.lfCharSet;
 +	cf.yHeight = 1440 * abs(lf.lfHeight) / GetDeviceCaps((HDC)hdcDraw, LOGPIXELSY);
 +	wsprintf(cf.szFaceName, lf.lfFaceName);
 +	m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult);
 +
 +	m_spTextServices->TxDraw(
 +	    DVASPECT_CONTENT,  		// Draw Aspect
 +		0,						// Lindex
 +		NULL,					// Info for drawing optimization
 +		NULL,					// target device information
 +		(HDC) hdcDraw,			// Draw device HDC
 +		NULL,			 	   	// Target device HDC
 +		(RECTL *) prc,			// Bounding client rectangle
 +		NULL,					// Clipping rectangle for metafiles
 +		(RECT *) NULL,			// Update rectangle
 +		NULL, 	   				// Call back function
 +		NULL,					// Call back parameter
 +		TXTVIEW_INACTIVE);		// What view of the object could be TXTVIEW_ACTIVE
 +	return S_OK;
 +}
 +
 +HRESULT CFormattedTextDraw::Create()
 +{
 +	return CreateTextServicesObject();
 +}
 +
 +HRESULT CFormattedTextDraw::get_NaturalSize(void *hdcDraw, long *Width, long *Height)
 +{
 +	LOGFONT lf;
 +	GetObject(GetCurrentObject((HDC)hdcDraw, OBJ_FONT), sizeof(lf), &lf);
 +
 +	LRESULT lResult;
 +	CHARFORMAT cf;
 +	cf.cbSize = sizeof(cf);
 +	cf.dwMask = CFM_FACE/*|CFM_COLOR*/|CFM_CHARSET|CFM_SIZE|
 +		(lf.lfWeight>=FW_BOLD?CFM_BOLD:0)|
 +		(lf.lfItalic?CFM_ITALIC:0)|
 +		(lf.lfUnderline?CFM_UNDERLINE:0)|
 +		(lf.lfStrikeOut?CFM_STRIKEOUT:0);
 +	cf.dwEffects = CFE_BOLD|CFE_ITALIC|CFE_STRIKEOUT|CFE_UNDERLINE;
 +	cf.crTextColor = GetTextColor((HDC)hdcDraw);
 +	cf.bCharSet = lf.lfCharSet;
 +	cf.yHeight = 1440 * abs(lf.lfHeight) / GetDeviceCaps((HDC)hdcDraw, LOGPIXELSY);
 +	wsprintf(cf.szFaceName, lf.lfFaceName);
 +	m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult);
 +
 +	SIZEL szExtent;
 +//	HDC	hdcDraw;
 +
 +	if (!m_spTextServices)
 +		return S_FALSE;
 +
 +//	hdcDraw = GetDC(NULL);
 +	*Height = 1;
 +	szExtent.cx = *Width;
 +	szExtent.cy = *Height;
 +	if (m_spTextServices->TxGetNaturalSize(DVASPECT_CONTENT, (HDC)hdcDraw, NULL, NULL, TXTNS_FITTOCONTENT, &szExtent, Width, Height) != S_OK)
 +	{
 +//		ReleaseDC(NULL, hdcDraw);
 +		return S_FALSE;
 +	}
 +
 +//	ReleaseDC(NULL, hdcDraw);
 +	return S_OK;
 +}
 +
 +/////////////////////////////////////////////////////////////////////////////
 +// ITextHost functions
 +HDC CFormattedTextDraw::TxGetDC()
 +{
 +	return NULL;
 +}
 +
 +INT CFormattedTextDraw::TxReleaseDC(HDC hdc)
 +{
 +	return 1;
 +}
 +
 +BOOL CFormattedTextDraw::TxShowScrollBar(INT fnBar, BOOL fShow)
 +{
 +	return FALSE;
 +}
 +
 +BOOL CFormattedTextDraw::TxEnableScrollBar(INT fuSBFlags, INT fuArrowflags)
 +{
 +	return FALSE;
 +}
 +
 +BOOL CFormattedTextDraw::TxSetScrollRange(INT fnBar, LONG nMinPos, INT nMaxPos, BOOL fRedraw)
 +{
 +	return FALSE;
 +}
 +
 +BOOL CFormattedTextDraw::TxSetScrollPos(INT fnBar, INT nPos, BOOL fRedraw)
 +{
 +	return FALSE;
 +}
 +
 +void CFormattedTextDraw::TxInvalidateRect(LPCRECT prc, BOOL fMode)
 +{
 +}
 +
 +void CFormattedTextDraw::TxViewChange(BOOL fUpdate)
 +{
 +}
 +
 +BOOL CFormattedTextDraw::TxCreateCaret(HBITMAP hbmp, INT xWidth, INT yHeight)
 +{
 +	return FALSE;
 +}
 +
 +BOOL CFormattedTextDraw::TxShowCaret(BOOL fShow)
 +{
 +	return FALSE;
 +}
 +
 +BOOL CFormattedTextDraw::TxSetCaretPos(INT x, INT y)
 +{
 +	return FALSE;
 +}
 +
 +BOOL CFormattedTextDraw::TxSetTimer(UINT idTimer, UINT uTimeout)
 +{
 +	return FALSE;
 +}
 +
 +void CFormattedTextDraw::TxKillTimer(UINT idTimer)
 +{
 +}
 +
 +void CFormattedTextDraw::TxScrollWindowEx(INT dx, INT dy, LPCRECT lprcScroll, LPCRECT lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate, UINT fuScroll)
 +{
 +}
 +
 +void CFormattedTextDraw::TxSetCapture(BOOL fCapture)
 +{
 +}
 +
 +void CFormattedTextDraw::TxSetFocus()
 +{
 +}
 +
 +
 +void CFormattedTextDraw::TxSetCursor(HCURSOR hcur, BOOL fText)
 +{
 +	if (fText)
 +	{
 +		SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW)));
 +	} else
 +	{
 +		SetCursor(hcur);
 +	}
 +}
 +
 +BOOL CFormattedTextDraw::TxScreenToClient(LPPOINT lppt)
 +{
 +	if (!m_hwndParent) return FALSE;
 +//	BOOL result = ScreenToClient(m_hwndParent, lppt);
 +//	lppt->x -= m_rcClient.left;
 +//	lppt->y -= m_rcClient.left;
 +	return ScreenToClient(m_hwndParent, lppt);
 +}
 +
 +BOOL CFormattedTextDraw::TxClientToScreen(LPPOINT lppt)
 +{
 +	if (!m_hwndParent) return FALSE;
 +//	BOOL result = ;
 +//	lppt->x -= m_rcClient.left;
 +//	lppt->y -= m_rcClient.left;
 +	return ClientToScreen(m_hwndParent, lppt);
 +}
 +
 +HRESULT	CFormattedTextDraw::TxActivate(LONG * plOldState)
 +{
 +	return S_OK;
 +}
 +
 +HRESULT	CFormattedTextDraw::TxDeactivate(LONG lNewState)
 +{
 +	return S_OK;
 +}
 +
 +HRESULT	CFormattedTextDraw::TxGetClientRect(LPRECT prc)
 +{
 +	*prc = m_rcClient;
 +	return S_OK;
 +}
 +
 +HRESULT	CFormattedTextDraw::TxGetViewInset(LPRECT prc)
 +{
 +	*prc = m_rcViewInset;
 +	return S_OK;
 +}
 +
 +HRESULT CFormattedTextDraw::TxGetCharFormat(const CHARFORMATW **ppCF)
 +{
 +	*ppCF = m_pCF;
 +	return S_OK;
 +}
 +
 +HRESULT	CFormattedTextDraw::TxGetParaFormat(const PARAFORMAT **ppPF)
 +{
 +	*ppPF = &m_PF;
 +	return S_OK;
 +}
 +
 +COLORREF CFormattedTextDraw::TxGetSysColor(int nIndex)
 +{
 +	return GetSysColor(nIndex);
 +}
 +
 +HRESULT	CFormattedTextDraw::TxGetBackStyle(TXTBACKSTYLE *pstyle)
 +{
 +	*pstyle = TXTBACK_TRANSPARENT;
 +	return S_OK;
 +}
 +
 +HRESULT	CFormattedTextDraw::TxGetMaxLength(DWORD *plength)
 +{
 +	*plength = m_dwMaxLength;
 +	return S_OK;
 +}
 +
 +HRESULT	CFormattedTextDraw::TxGetScrollBars(DWORD *pdwScrollBar)
 +{
 +	*pdwScrollBar = m_dwScrollbar;
 +	return S_OK;
 +}
 +
 +HRESULT	CFormattedTextDraw::TxGetPasswordChar(TCHAR *pch)
 +{
 +	return S_FALSE;
 +}
 +
 +HRESULT	CFormattedTextDraw::TxGetAcceleratorPos(LONG *pcp)
 +{
 +	*pcp = -1;
 +	return S_OK;
 +}
 +
 +HRESULT	CFormattedTextDraw::TxGetExtent(LPSIZEL lpExtent)
 +{
 +	return E_NOTIMPL;
 +}
 +
 +HRESULT CFormattedTextDraw::OnTxCharFormatChange(const CHARFORMATW * pcf)
 +{
 +	memcpy(m_pCF, pcf, pcf->cbSize);
 +	return S_OK;
 +}
 +
 +HRESULT	CFormattedTextDraw::OnTxParaFormatChange(const PARAFORMAT * ppf)
 +{
 +	memcpy(&m_PF, ppf, ppf->cbSize);
 +	return S_OK;
 +}
 +
 +HRESULT	CFormattedTextDraw::TxGetPropertyBits(DWORD dwMask, DWORD *pdwBits)
 +{
 +	*pdwBits = m_dwPropertyBits;
 +	return S_OK;
 +}
 +
 +HRESULT	CFormattedTextDraw::TxNotify(DWORD iNotify, void *pv)
 +{
 +	return S_OK;
 +}
 +
 +HIMC CFormattedTextDraw::TxImmGetContext()
 +{
 +	return NULL;
 +}
 +
 +void CFormattedTextDraw::TxImmReleaseContext(HIMC himc)
 +{
 +}
 +
 +HRESULT	CFormattedTextDraw::TxGetSelectionBarWidth(LONG *lSelBarWidth)
 +{
 +	*lSelBarWidth = 100;
 +	return S_OK;
 +}
 +
 +/////////////////////////////////////////////////////////////////////////////
 +// custom functions
 +
 +HRESULT CFormattedTextDraw::CharFormatFromHFONT(CHARFORMAT2W* pCF, HFONT hFont)
 +// Takes an HFONT and fills in a CHARFORMAT2W structure with the corresponding info
 +{
 +
 +	HWND hWnd;
 +	LOGFONT lf;
 +	HDC hDC;
 +	LONG yPixPerInch;
 +
 +	// Get LOGFONT for default font
 +	if (!hFont)
 +		hFont = (HFONT) GetStockObject(SYSTEM_FONT);
 +
 +	// Get LOGFONT for passed hfont
 +	if (!GetObject(hFont, sizeof(LOGFONT), &lf))
 +		return E_FAIL;
 +
 +	// Set CHARFORMAT structure
 +	memset(pCF, 0, sizeof(CHARFORMAT2W));
 +	pCF->cbSize = sizeof(CHARFORMAT2W);
 +
 +	hWnd = GetDesktopWindow();
 +	hDC = GetDC(hWnd);
 +	yPixPerInch = GetDeviceCaps(hDC, LOGPIXELSY);
 +	pCF->yHeight = -lf.lfHeight * LY_PER_INCH / yPixPerInch;
 +	ReleaseDC(hWnd, hDC);
 +
 +	pCF->yOffset = 0;
 +	pCF->crTextColor = 0;
 +
 +	pCF->dwEffects = CFM_EFFECTS | CFE_AUTOBACKCOLOR;
 +	pCF->dwEffects &= ~(CFE_PROTECTED | CFE_LINK | CFE_AUTOCOLOR);
 +
 +	if(lf.lfWeight < FW_BOLD)
 +		pCF->dwEffects &= ~CFE_BOLD;
 +
 +	if(!lf.lfItalic)
 +		pCF->dwEffects &= ~CFE_ITALIC;
 +
 +	if(!lf.lfUnderline)
 +		pCF->dwEffects &= ~CFE_UNDERLINE;
 +
 +	if(!lf.lfStrikeOut)
 +		pCF->dwEffects &= ~CFE_STRIKEOUT;
 +
 +	pCF->dwMask = CFM_ALL | CFM_BACKCOLOR | CFM_STYLE;
 +	pCF->bCharSet = lf.lfCharSet;
 +	pCF->bPitchAndFamily = lf.lfPitchAndFamily;
 +
 +#ifdef UNICODE
 +	lstrcpyW(pCF->szFaceName, lf.lfFaceName);
 +#else
 +	MultiByteToWideChar(CP_ACP, 0, lf.lfFaceName, LF_FACESIZE, pCF->szFaceName, LF_FACESIZE);
 +#endif
 +
 +	return S_OK;
 +}
 +
 +HRESULT CFormattedTextDraw::InitDefaultCharFormat()
 +{
 +	return CharFormatFromHFONT(m_pCF, NULL);
 +}
 +
 +HRESULT CFormattedTextDraw::InitDefaultParaFormat()
 +{
 +	memset(&m_PF, 0, sizeof(PARAFORMAT2));
 +	m_PF.cbSize = sizeof(PARAFORMAT2);
 +	m_PF.dwMask = PFM_ALL;
 +	m_PF.wAlignment = PFA_LEFT;
 +	m_PF.cTabCount = 1;
 +	m_PF.rgxTabs[0] = lDefaultTab;
 +	return S_OK;
 +}
 +
 +HRESULT CFormattedTextDraw::CreateTextServicesObject()
 +{
 +	HRESULT hr;
 +	IUnknown *spUnk;
 +
 +	hr = MyCreateTextServices(NULL, static_cast<ITextHost*>(this), &spUnk);
 +	if (hr == S_OK) {
 +		hr = spUnk->QueryInterface(IID_ITextServices, (void**)&m_spTextServices);
 +		hr = spUnk->QueryInterface(IID_ITextDocument, (void**)&m_spTextDocument);
 +		spUnk->Release();
 +	}
 +	return hr;
 +}
 +
 diff --git a/mTextControl/src/FormattedTextDraw.h b/mTextControl/src/FormattedTextDraw.h new file mode 100644 index 0000000..06a939c --- /dev/null +++ b/mTextControl/src/FormattedTextDraw.h @@ -0,0 +1,193 @@ +// Feel free to use this code in your own applications.
 +// The Author does not guarantee anything about this code.
 +// Author : Yves Maurer
 +// FormattedTextDraw.h : Declaration of the CFormattedTextDraw
 +
 +#ifndef __FORMATTEDTEXTDRAW_H_
 +#define __FORMATTEDTEXTDRAW_H_
 +
 +// be sure to link this project with riched20.lib
 +#ifndef LY_PER_INCH
 +#define LY_PER_INCH   1440
 +#define HOST_BORDER 0
 +#endif
 +
 +typedef struct tagCOOKIE
 +{
 +	bool isUnicode;
 +	union
 +	{
 +		char *ansi;
 +		WCHAR *unicode;
 +	};
 +	DWORD dwSize;
 +	DWORD dwCount;
 +} COOKIE, *PCOOKIE;
 +
 +extern HRESULT	(WINAPI *MyCreateTextServices)(IUnknown *punkOuter, ITextHost *pITextHost, IUnknown **ppUnk);
 +
 +/////////////////////////////////////////////////////////////////////////////
 +// IFormatttedTextDraw
 +interface IFormattedTextDraw
 +{
 +public:
 +	virtual ~IFormattedTextDraw() {};
 +	virtual HRESULT get_NaturalSize(void *hdcDraw, long *Width, long *pVal) = 0;
 +	virtual HRESULT Create() = 0;
 +	virtual HRESULT Draw(void *hdcDraw, RECT *prc) = 0;
 +	virtual HRESULT putRTFTextA(char *newVal) = 0;
 +	virtual HRESULT putRTFTextW(WCHAR *newVal) = 0;
 +	virtual HRESULT putTextA(char *newVal) = 0;
 +	virtual HRESULT putTextW(WCHAR *newVal) = 0;
 +
 +	virtual ITextServices *getTextService() = 0;
 +	virtual ITextDocument *getTextDocument() = 0;
 +	virtual void setParentWnd(HWND hwnd, RECT rect) = 0;
 +
 +// COM-like functions
 +    virtual ULONG STDMETHODCALLTYPE AddRef(void) = 0;
 +    virtual ULONG STDMETHODCALLTYPE Release(void) = 0;
 +};
 +
 +
 +/////////////////////////////////////////////////////////////////////////////
 +// CFormattedTextDraw
 +class CFormattedTextDraw:
 +	public ITextHost,
 +	public IFormattedTextDraw
 +{
 +public:
 +	CFormattedTextDraw()
 +	{
 +		HDC hdcScreen;
 +
 +		hdcScreen = GetDC(NULL);
 +		nPixelsPerInchX = GetDeviceCaps(hdcScreen, LOGPIXELSX);
 +		nPixelsPerInchY = GetDeviceCaps(hdcScreen, LOGPIXELSY);
 +		ReleaseDC(NULL, hdcScreen);
 +
 +		SetRectEmpty(&m_rcClient);
 +		SetRectEmpty(&m_rcViewInset);
 +
 +		m_pCF = (CHARFORMAT2W*) malloc(sizeof(CHARFORMAT2W));
 +
 +		InitDefaultCharFormat();
 +		InitDefaultParaFormat();
 +		m_spTextServices = NULL;
 +		m_spTextDocument = NULL;
 +
 +		m_dwPropertyBits = TXTBIT_RICHTEXT | TXTBIT_MULTILINE | TXTBIT_WORDWRAP | TXTBIT_USECURRENTBKG;
 +		m_dwScrollbar = 0;
 +		m_dwMaxLength = INFINITE;
 +	}
 +
 +	~CFormattedTextDraw()
 +	{
 +		free(m_pCF);
 +		if (m_spTextServices != NULL)
 +			m_spTextServices->Release();
 +		if (m_spTextDocument != NULL)
 +			m_spTextDocument->Release();
 +	}
 +
 +// Minimal COM functionality
 +    HRESULT STDMETHODCALLTYPE QueryInterface( 
 +        /* [in] */ REFIID riid,
 +        /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject)
 +	{
 +		*ppvObject = NULL;
 +		return S_FALSE;
 +	}
 +    
 +    ULONG STDMETHODCALLTYPE AddRef(void)
 +	{
 +		return 0;
 +	}
 +    
 +    ULONG STDMETHODCALLTYPE Release(void)
 +	{
 +		return 0;
 +	}
 +
 +// IFormattedTextDraw
 +public:
 +	HRESULT get_NaturalSize(void *hdcDraw, long *Width, long *pVal);
 +	HRESULT Create();
 +	HRESULT Draw(void *hdcDraw, RECT *prc);
 +	HRESULT putRTFTextA(char *newVal);
 +	HRESULT putRTFTextW(WCHAR *newVal);
 +	HRESULT putTextA(char *newVal);
 +	HRESULT putTextW(WCHAR *newVal);
 +
 +	ITextServices *getTextService() { return m_spTextServices; };
 +	ITextDocument *getTextDocument() { return m_spTextDocument; };
 +	virtual void setParentWnd(HWND hwnd, RECT rect) { m_hwndParent = hwnd; m_rcClient = rect; }
 +
 +// ITextHost
 +	HDC TxGetDC();
 +	INT TxReleaseDC(HDC hdc);
 +	BOOL TxShowScrollBar(INT fnBar, BOOL fShow);
 +	BOOL TxEnableScrollBar(INT fuSBFlags, INT fuArrowflags);
 +	BOOL TxSetScrollRange(INT fnBar, LONG nMinPos, INT nMaxPos, BOOL fRedraw);
 +	BOOL TxSetScrollPos(INT fnBar, INT nPos, BOOL fRedraw);
 +	void TxInvalidateRect(LPCRECT prc, BOOL fMode);
 +	void TxViewChange(BOOL fUpdate);
 +	BOOL TxCreateCaret(HBITMAP hbmp, INT xWidth, INT yHeight);
 +	BOOL TxShowCaret(BOOL fShow);
 +	BOOL TxSetCaretPos(INT x, INT y);
 +	BOOL TxSetTimer(UINT idTimer, UINT uTimeout);
 +	void TxKillTimer(UINT idTimer);
 +	void TxScrollWindowEx(INT dx, INT dy, LPCRECT lprcScroll, LPCRECT lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate, UINT fuScroll);
 +	void TxSetCapture(BOOL fCapture);
 +	void TxSetFocus();
 +	void TxSetCursor(HCURSOR hcur, BOOL fText);
 +	BOOL TxScreenToClient(LPPOINT lppt);
 +	BOOL TxClientToScreen(LPPOINT lppt);
 +	HRESULT	TxActivate(LONG * plOldState);
 +	HRESULT	TxDeactivate(LONG lNewState);
 +	HRESULT	TxGetClientRect(LPRECT prc);
 +	HRESULT	TxGetViewInset(LPRECT prc);
 +	HRESULT TxGetCharFormat(const CHARFORMATW **ppCF);
 +	HRESULT	TxGetParaFormat(const PARAFORMAT **ppPF);
 +	COLORREF TxGetSysColor(int nIndex);
 +	HRESULT	TxGetBackStyle(TXTBACKSTYLE *pstyle);
 +	HRESULT	TxGetMaxLength(DWORD *plength);
 +	HRESULT	TxGetScrollBars(DWORD *pdwScrollBar);
 +	HRESULT	TxGetPasswordChar(TCHAR *pch);
 +	HRESULT	TxGetAcceleratorPos(LONG *pcp);
 +	HRESULT	TxGetExtent(LPSIZEL lpExtent);
 +	HRESULT OnTxCharFormatChange(const CHARFORMATW * pcf);
 +	HRESULT	OnTxParaFormatChange(const PARAFORMAT * ppf);
 +	HRESULT	TxGetPropertyBits(DWORD dwMask, DWORD *pdwBits);
 +	HRESULT	TxNotify(DWORD iNotify, void *pv);
 +	HIMC TxImmGetContext();
 +	void TxImmReleaseContext(HIMC himc);
 +	HRESULT	TxGetSelectionBarWidth(LONG *lSelBarWidth);
 +
 +// Custom functions
 +	HRESULT CharFormatFromHFONT(CHARFORMAT2W* pCF, HFONT hFont);
 +	HRESULT InitDefaultCharFormat();
 +	HRESULT InitDefaultParaFormat();
 +	HRESULT CreateTextServicesObject();
 +
 +// Variables
 +	HWND			m_hwndParent;
 +	RECT			m_rcClient;			// Client Rect
 +	RECT			m_rcViewInset;		// view rect inset
 +	SIZEL			m_sizelExtent;		// Extent array
 +
 +	int				nPixelsPerInchX;    // Pixels per logical inch along width
 +	int				nPixelsPerInchY;    // Pixels per logical inch along height
 +
 +	CHARFORMAT2W	*m_pCF;
 +	PARAFORMAT2		m_PF;
 +	DWORD			m_dwScrollbar;		// Scroll bar style
 +	DWORD			m_dwPropertyBits;	// Property bits
 +	DWORD			m_dwMaxLength;
 +	COOKIE			m_editCookie;
 +
 +	ITextServices	*m_spTextServices;
 +	ITextDocument	*m_spTextDocument;
 +};
 +
 +#endif //__FORMATTEDTEXTDRAW_H_
 diff --git a/mTextControl/src/ImageDataObjectHlp.cpp b/mTextControl/src/ImageDataObjectHlp.cpp new file mode 100644 index 0000000..fd81142 --- /dev/null +++ b/mTextControl/src/ImageDataObjectHlp.cpp @@ -0,0 +1,252 @@ +/*
 +Miranda SmileyAdd Plugin
 +Copyright (C) 2004-2005 Rein-Peter de Boer (peacow) and followers
 +
 +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.
 +*/
 +
 +//imagedataobject
 +//code taken partly from public example on the internet, source unknown.
 +
 +#include "headers.h"
 +
 +struct EMFCACHE
 +{
 +	HENHMETAFILE hEmf;
 +	HICON hIcon;
 +	EMFCACHE *prev;
 +	EMFCACHE *next;
 +} *emfCache = 0;
 +int emfCacheSize = 0;
 +CRITICAL_SECTION csEmfCache;
 +
 +void LoadEmfCache()
 +{
 +	InitializeCriticalSection(&csEmfCache);
 +}
 +
 +void UnloadEmfCache()
 +{
 +	while (emfCache)
 +	{
 +		EMFCACHE *tmp = emfCache->next;
 +		delete emfCache;
 +		emfCache = tmp;
 +	}
 +	DeleteCriticalSection(&csEmfCache);
 +}
 +
 +HENHMETAFILE CacheIconToEmf(HICON hIcon)
 +{
 +	HENHMETAFILE result = 0;
 +	EnterCriticalSection(&csEmfCache);
 +	for (EMFCACHE *p = emfCache; p; p = p->next)
 +		if (p->hIcon == hIcon)
 +		{
 +			if (p->prev)
 +			{
 +				p->prev->next = p->next;
 +				if (p->next) p->next->prev = p->prev;
 +				p->prev = 0;
 +				emfCache->prev = p;
 +				p->next = emfCache;
 +				emfCache = p;
 +				result = CopyEnhMetaFile(emfCache->hEmf, 0);
 +				break;
 +			}
 +		}
 +
 +	// cache new item
 +	if (!result)
 +	{
 +		EMFCACHE *newItem = new EMFCACHE;
 +		newItem->prev = 0;
 +		newItem->next = emfCache;
 +		if (emfCache) emfCache->prev = newItem;
 +		emfCache = newItem;
 +		emfCacheSize++;
 +
 +		HDC emfdc = CreateEnhMetaFile(NULL, NULL, NULL, _T("icon"));
 +		DrawIconEx(emfdc, 0, 0, (HICON)hIcon, 16, 16, 0, NULL, DI_NORMAL);
 +		emfCache->hIcon = hIcon;
 +		emfCache->hEmf = CloseEnhMetaFile(emfdc);
 +		result = CopyEnhMetaFile(emfCache->hEmf, 0);
 +	}
 +
 +	// tail cutoff
 +	if (emfCacheSize > 20)
 +	{
 +		int n = 0;
 +		EMFCACHE *p;
 +		for (p = emfCache; p; p = p->next)
 +			if (++n > 20)
 +				break;
 +		while (p->next)
 +		{
 +			EMFCACHE *tmp = p->next;
 +			p->next = p->next->next;
 +			delete tmp;
 +		}
 +		if (p->next) p->next->prev = p;
 +		emfCacheSize = 20;
 +	}
 +
 +	LeaveCriticalSection(&csEmfCache);
 +
 +	return result;
 +}
 +
 +HRESULT CreateDataObject(const FORMATETC *fmtetc, const STGMEDIUM *stgmed, UINT count, IDataObject **ppDataObject);
 +
 +// returns true on success, false on failure
 +//bool InsertBitmap(IRichEditOle* pRichEditOle, HBITMAP hBitmap, HGLOBAL hGlobal)
 +bool InsertBitmap(IRichEditOle* pRichEditOle, HENHMETAFILE hEmf)
 +{
 +    SCODE sc;
 +
 +    // Get the image data object
 +    //
 +	static const FORMATETC lc_format[] =
 +	{ 
 +		{ CF_ENHMETAFILE, 0, DVASPECT_CONTENT, -1, TYMED_ENHMF }//,
 +//		{ CF_BITMAP, 0, DVASPECT_CONTENT, -1, TYMED_GDI },
 +//		{ CF_TEXT,   0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL } 
 +	};
 +
 +	STGMEDIUM lc_stgmed[] =
 +	{
 +		{ TYMED_ENHMF, { (HBITMAP)hEmf }, 0 }//,
 +//		{ TYMED_GDI, { hBitmap }, 0 },
 +//		{ TYMED_HGLOBAL, { (HBITMAP)hGlobal }, 0 }
 +	};
 +
 +	IDataObject *pods;
 +	CreateDataObject(lc_format, lc_stgmed, 1, &pods);
 +
 +    // Get the RichEdit container site
 +    //
 +    IOleClientSite *pOleClientSite; 
 +    pRichEditOle->GetClientSite(&pOleClientSite);
 +
 +    // Initialize a Storage Object
 +    //
 +    LPLOCKBYTES lpLockBytes = NULL;
 +    sc = CreateILockBytesOnHGlobal(NULL, TRUE, &lpLockBytes);
 +    if (sc != S_OK) 
 +	{
 +        pOleClientSite->Release();
 +        return false; 
 +    }
 +
 +    IStorage *pStorage; 
 +    sc = StgCreateDocfileOnILockBytes(lpLockBytes,
 +                                      STGM_SHARE_EXCLUSIVE|STGM_CREATE|STGM_READWRITE, 0, &pStorage);
 +    if (sc != S_OK) 
 +    {
 +		lpLockBytes->Release();
 +        pOleClientSite->Release();
 +        return false; 
 +    }
 +
 +    // The final ole object which will be inserted in the richedit control
 +    //
 +    IOleObject *pOleObject;
 +    sc = OleCreateStaticFromData(pods, IID_IOleObject, OLERENDER_FORMAT, 
 +                                 (LPFORMATETC)lc_format, pOleClientSite, pStorage, (void **)&pOleObject);
 +    if (sc != S_OK) 
 +    {
 +        pStorage->Release();
 +		lpLockBytes->Release();
 +        pOleClientSite->Release();
 +        return false;
 +    }
 +
 +    // all items are "contained" -- this makes our reference to this object
 +    //  weak -- which is needed for links to embedding silent update.
 +    OleSetContainedObject(pOleObject, TRUE);
 +
 +    // Now Add the object to the RichEdit 
 +    //
 +	REOBJECT reobject = { 0 };
 +
 +	reobject.cbStruct = sizeof(REOBJECT);
 +    reobject.cp = REO_CP_SELECTION ;
 +    reobject.dvaspect = DVASPECT_CONTENT;
 +    reobject.poleobj = pOleObject;
 +    reobject.polesite = pOleClientSite;
 +    reobject.pstg = pStorage;
 +    reobject.dwFlags = REO_BELOWBASELINE;
 +
 +    sc = pOleObject->GetUserClassID(&reobject.clsid);
 +    if (sc != S_OK) 
 +	{
 +        pOleObject->Release();
 +        pStorage->Release();
 +		lpLockBytes->Release();
 +		pOleClientSite->Release();
 +        return false;
 +    }
 +
 +    // Insert the bitmap at the current location in the richedit control
 +    //
 +    sc = pRichEditOle->InsertObject(&reobject);
 +
 +    // Release all unnecessary interfaces
 +    //
 +    pOleObject->Release();
 +    pStorage->Release();
 +    lpLockBytes->Release();
 +    pOleClientSite->Release();
 +    pods->Release();
 +
 +	return sc == S_OK;
 +}
 +/*
 +int RichEditVersion(void) 
 +{
 +    // get size of version information
 +    DWORD dummy;
 +    DWORD size = ::GetFileVersionInfoSize(_T("riched20.dll"), &dummy);
 +    if (!size) return -1;  // unexpected failure
 +
 +    // allocate a buffer for version information
 +    BYTE* buffer = (BYTE*) new BYTE[size];
 +
 +    // get the version information
 +    if (!::GetFileVersionInfo(_T("riched20.dll"), 0, size, buffer)) 
 +	{
 +        delete[] buffer;
 +        return -1;  // unexpected faiure
 +    }
 +
 +    // get the static version information
 +    VS_FIXEDFILEINFO* vsInfo;
 +    UINT vsInfoSize;
 +    if (!::VerQueryValue(buffer, _T("\\"), (LPVOID*) &vsInfo, &vsInfoSize)) 
 +	{
 +        delete[] buffer;
 +        return -1;  // unexpected failure
 +    }
 +
 +    int FileVersionMinor = LOWORD(vsInfo->dwFileVersionMS);
 +
 +    // free the buffer
 +    delete[] buffer;
 +
 +    return FileVersionMinor ? 3 : 2;
 +}
 +
 +bool g_HiddenTextSupported =  RichEditVersion() == 3;
 +*/
\ No newline at end of file diff --git a/mTextControl/src/ImageDataObjectHlp.h b/mTextControl/src/ImageDataObjectHlp.h new file mode 100644 index 0000000..8b8e030 --- /dev/null +++ b/mTextControl/src/ImageDataObjectHlp.h @@ -0,0 +1,32 @@ +/*
 +Miranda SmileyAdd Plugin
 +Copyright (C) 2004 Rein-Peter de Boer (peacow)
 +
 +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.
 +*/
 +
 +#ifndef _IMAGEDATAOBJECTHLP_
 +#define _IMAGEDATAOBJECTHLP_
 +
 +#include <richole.h>
 +
 +void LoadEmfCache();
 +void UnloadEmfCache();
 +HENHMETAFILE CacheIconToEmf(HICON hIcon);
 +
 +//bool InsertBitmap(IRichEditOle* pRichEditOle, HBITMAP hBitmap, HGLOBAL hGlobal);
 +bool InsertBitmap(IRichEditOle* pRichEditOle, HENHMETAFILE hEmf);
 +
 +#endif
 diff --git a/mTextControl/src/dataobject.cpp b/mTextControl/src/dataobject.cpp new file mode 100644 index 0000000..44165fe --- /dev/null +++ b/mTextControl/src/dataobject.cpp @@ -0,0 +1,290 @@ +//
 +//	DATAOBJECT.CPP
 +//
 +//	Implementation of the IDataObject COM interface
 +//
 +//	By J Brown 2004 
 +//
 +//	www.catch22.net
 +//
 +
 +//#define STRICT
 +
 +#include "headers.h"
 +
 +const ULONG MAX_FORMATS = 100;
 +
 +HRESULT CreateEnumFormatEtc(UINT nNumFormats, FORMATETC *pFormatEtc, IEnumFORMATETC **ppEnumFormatEtc);
 +
 +class CDataObject : public IDataObject
 +{
 +public:
 +	//
 +	// IUnknown members
 +	//
 +	HRESULT __stdcall QueryInterface (REFIID iid, void ** ppvObject);
 +	ULONG   __stdcall AddRef (void);
 +	ULONG   __stdcall Release (void);
 +		
 +	//
 +	// IDataObject members
 +	//
 +	HRESULT __stdcall GetData				(FORMATETC *pFormatEtc,  STGMEDIUM *pMedium);
 +	HRESULT __stdcall GetDataHere			(FORMATETC *pFormatEtc,  STGMEDIUM *pMedium);
 +	HRESULT __stdcall QueryGetData			(FORMATETC *pFormatEtc);
 +	HRESULT __stdcall GetCanonicalFormatEtc (FORMATETC *pFormatEct,  FORMATETC *pFormatEtcOut);
 +	HRESULT __stdcall SetData				(FORMATETC *pFormatEtc,  STGMEDIUM *pMedium,  BOOL fRelease);
 +	HRESULT __stdcall EnumFormatEtc			(DWORD      dwDirection, IEnumFORMATETC **ppEnumFormatEtc);
 +	HRESULT __stdcall DAdvise				(FORMATETC *pFormatEtc,  DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection);
 +	HRESULT __stdcall DUnadvise				(DWORD      dwConnection);
 +	HRESULT __stdcall EnumDAdvise			(IEnumSTATDATA **ppEnumAdvise);
 +
 +	//
 +	// Constructor / Destructor
 +	//
 +	CDataObject(const FORMATETC *fmt, const STGMEDIUM *stgmed, int count);
 +	~CDataObject();
 +	
 +private:
 +
 +	int LookupFormatEtc(FORMATETC *pFormatEtc);
 +
 +    //
 +	// any private members and functions
 +	//
 +    LONG	   m_lRefCount;
 +
 +	FORMATETC *m_pFormatEtc;
 +	STGMEDIUM *m_pStgMedium;
 +	LONG	   m_nNumFormats;
 +
 +};
 +
 +//
 +//	Constructor
 +//
 +CDataObject::CDataObject(const FORMATETC *fmtetc, const STGMEDIUM *stgmed, int count) 
 +{
 +	m_lRefCount  = 1;
 +	m_nNumFormats = count;
 +	
 +	m_pFormatEtc  = new FORMATETC[count];
 +	m_pStgMedium  = new STGMEDIUM[count];
 +
 +	for(int i = 0; i < count; i++)
 +	{
 +		m_pFormatEtc[i] = fmtetc[i];
 +		m_pStgMedium[i] = stgmed[i];
 +	}
 +}
 +
 +//
 +//	Destructor
 +//
 +CDataObject::~CDataObject()
 +{
 +	// cleanup
 +	for (int i = 0; i < m_nNumFormats; i++)
 +	{	
 +//		ReleaseStgMedium(&m_pStgMedium[i]);
 +	}
 +
 +	if(m_pFormatEtc) delete[] m_pFormatEtc;
 +	if(m_pStgMedium) delete[] m_pStgMedium;
 +}
 +
 +//
 +//	IUnknown::AddRef
 +//
 +ULONG __stdcall CDataObject::AddRef(void)
 +{
 +    // increment object reference count
 +    return InterlockedIncrement(&m_lRefCount);
 +}
 +
 +//
 +//	IUnknown::Release
 +//
 +ULONG __stdcall CDataObject::Release(void)
 +{
 +    // decrement object reference count
 +	LONG count = InterlockedDecrement(&m_lRefCount);
 +		
 +	if(count == 0)
 +	{
 +		delete this;
 +		return 0;
 +	}
 +	else
 +	{
 +		return count;
 +	}
 +}
 +
 +//
 +//	IUnknown::QueryInterface
 +//
 +HRESULT __stdcall CDataObject::QueryInterface(REFIID iid, void **ppvObject)
 +{
 +    // check to see what interface has been requested
 +    if(iid == IID_IDataObject || iid == IID_IUnknown)
 +    {
 +        AddRef();
 +        *ppvObject = this;
 +        return S_OK;
 +    }
 +    else
 +    {
 +        *ppvObject = 0;
 +        return E_NOINTERFACE;
 +    }
 +}
 +
 +int CDataObject::LookupFormatEtc(FORMATETC *pFormatEtc)
 +{
 +	for (int i = 0; i < m_nNumFormats; i++)
 +	{
 +		if((pFormatEtc->tymed    &  m_pFormatEtc[i].tymed)   &&
 +			pFormatEtc->cfFormat == m_pFormatEtc[i].cfFormat && 
 +			pFormatEtc->dwAspect == m_pFormatEtc[i].dwAspect)
 +		{
 +			return i;
 +		}
 +	}
 +
 +	return -1;
 +}
 +
 +//
 +//	IDataObject::GetData
 +//
 +HRESULT __stdcall CDataObject::GetData (FORMATETC *pFormatEtc, STGMEDIUM *pMedium)
 +{
 +	int idx;
 +
 +	//
 +	// try to match the requested FORMATETC with one of our supported formats
 +	//
 +	if((idx = LookupFormatEtc(pFormatEtc)) == -1)
 +	{
 +		return DV_E_FORMATETC;
 +	}
 +
 +	//
 +	// found a match! transfer the data into the supplied storage-medium
 +	//
 +	pMedium->tymed			 = m_pFormatEtc[idx].tymed;
 +	pMedium->pUnkForRelease  = 0;
 +	
 +	switch (pMedium->tymed)
 +	{
 +		case TYMED_HGLOBAL:
 +		case TYMED_GDI:
 +		case TYMED_ENHMF:
 +//			pMedium->hBitmap = (HBITMAP)OleDuplicateData(m_pStgMedium[idx].hBitmap, pFormatEtc->cfFormat, 0);
 +			pMedium->hBitmap = m_pStgMedium[idx].hBitmap;
 +			break;
 +
 +		default:
 +			return DV_E_FORMATETC;
 +	}
 +	if (pMedium->hBitmap == NULL) return STG_E_MEDIUMFULL;
 +
 +	return S_OK;
 +}
 +
 +//
 +//	IDataObject::GetDataHere
 +//
 +HRESULT __stdcall CDataObject::GetDataHere (FORMATETC *pFormatEtc, STGMEDIUM *pMedium)
 +{
 +	// GetDataHere is only required for IStream and IStorage mediums
 +	// It is an error to call GetDataHere for things like HGLOBAL and other clipboard formats
 +	//
 +	//	OleFlushClipboard 
 +	//
 +	return DATA_E_FORMATETC;
 +}
 +
 +//
 +//	IDataObject::QueryGetData
 +//
 +//	Called to see if the IDataObject supports the specified format of data
 +//
 +HRESULT __stdcall CDataObject::QueryGetData (FORMATETC *pFormatEtc)
 +{
 +	return (LookupFormatEtc(pFormatEtc) == -1) ? DV_E_FORMATETC : S_OK;
 +}
 +
 +//
 +//	IDataObject::GetCanonicalFormatEtc
 +//
 +HRESULT __stdcall CDataObject::GetCanonicalFormatEtc (FORMATETC *pFormatEct, FORMATETC *pFormatEtcOut)
 +{
 +	// Apparently we have to set this field to NULL even though we don't do anything else
 +	pFormatEtcOut->ptd = NULL;
 +	return E_NOTIMPL;
 +}
 +
 +//
 +//	IDataObject::SetData
 +//
 +HRESULT __stdcall CDataObject::SetData (FORMATETC *pFormatEtc, STGMEDIUM *pMedium,  BOOL fRelease)
 +{
 +	return E_NOTIMPL;
 +}
 +
 +//
 +//	IDataObject::EnumFormatEtc
 +//
 +HRESULT __stdcall CDataObject::EnumFormatEtc (DWORD dwDirection, IEnumFORMATETC **ppEnumFormatEtc)
 +{
 +	if(dwDirection == DATADIR_GET)
 +	{
 +		// for Win2k+ you can use the SHCreateStdEnumFmtEtc API call, however
 +		// to support all Windows platforms we need to implement IEnumFormatEtc ourselves.
 +		return CreateEnumFormatEtc(m_nNumFormats, m_pFormatEtc, ppEnumFormatEtc);
 +	}
 +	else
 +	{
 +		// the direction specified is not support for drag+drop
 +		return E_NOTIMPL;
 +	}
 +}
 +
 +//
 +//	IDataObject::DAdvise
 +//
 +HRESULT __stdcall CDataObject::DAdvise (FORMATETC *pFormatEtc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
 +{
 +	return OLE_E_ADVISENOTSUPPORTED;
 +}
 +
 +//
 +//	IDataObject::DUnadvise
 +//
 +HRESULT __stdcall CDataObject::DUnadvise (DWORD dwConnection)
 +{
 +	return OLE_E_ADVISENOTSUPPORTED;
 +}
 +
 +//
 +//	IDataObject::EnumDAdvise
 +//
 +HRESULT __stdcall CDataObject::EnumDAdvise (IEnumSTATDATA **ppEnumAdvise)
 +{
 +	return OLE_E_ADVISENOTSUPPORTED;
 +}
 +
 +//
 +//	Helper function
 +//
 +HRESULT CreateDataObject (const FORMATETC *fmtetc, const STGMEDIUM *stgmeds, UINT count, IDataObject **ppDataObject)
 +{
 +	if(ppDataObject == 0)
 +		return E_INVALIDARG;
 +
 +	*ppDataObject = new CDataObject(fmtetc, stgmeds, count);
 +
 +	return (*ppDataObject) ? S_OK : E_OUTOFMEMORY;
 +}
 diff --git a/mTextControl/src/enumformat.cpp b/mTextControl/src/enumformat.cpp new file mode 100644 index 0000000..7daac15 --- /dev/null +++ b/mTextControl/src/enumformat.cpp @@ -0,0 +1,232 @@ +//
 +//	ENUMFORMAT.CPP
 +//
 +//	By J Brown 2004 
 +//
 +//	www.catch22.net
 +//
 +//	Implementation of the IEnumFORMATETC interface
 +//
 +//	For Win2K and above look at the SHCreateStdEnumFmtEtc API call!!
 +//
 +//	Apparently the order of formats in an IEnumFORMATETC object must be
 +//  the same as those that were stored in the clipboard
 +//
 +//
 +
 +//#define STRICT
 +
 +#include "headers.h"
 +
 +class CEnumFormatEtc : public IEnumFORMATETC
 +{
 +public:
 +
 +	//
 +	// IUnknown members
 +	//
 +	HRESULT __stdcall  QueryInterface (REFIID iid, void ** ppvObject);
 +	ULONG	__stdcall  AddRef (void);
 +	ULONG	__stdcall  Release (void);
 +
 +	//
 +	// IEnumFormatEtc members
 +	//
 +	HRESULT __stdcall  Next  (ULONG celt, FORMATETC * rgelt, ULONG * pceltFetched);
 +	HRESULT __stdcall  Skip  (ULONG celt); 
 +	HRESULT __stdcall  Reset (void);
 +	HRESULT __stdcall  Clone (IEnumFORMATETC ** ppEnumFormatEtc);
 +
 +	//
 +	// Construction / Destruction
 +	//
 +	CEnumFormatEtc(FORMATETC *pFormatEtc, int nNumFormats);
 +	~CEnumFormatEtc();
 +
 +private:
 +
 +	LONG		m_lRefCount;		// Reference count for this COM interface
 +	ULONG		m_nIndex;			// current enumerator index
 +	ULONG		m_nNumFormats;		// number of FORMATETC members
 +	FORMATETC * m_pFormatEtc;		// array of FORMATETC objects
 +};
 +
 +//
 +//	"Drop-in" replacement for SHCreateStdEnumFmtEtc. Called by CDataObject::EnumFormatEtc
 +//
 +HRESULT CreateEnumFormatEtc(UINT nNumFormats, FORMATETC *pFormatEtc, IEnumFORMATETC **ppEnumFormatEtc)
 +{
 +	if(nNumFormats == 0 || pFormatEtc == 0 || ppEnumFormatEtc == 0)
 +		return E_INVALIDARG;
 +
 +	*ppEnumFormatEtc = new CEnumFormatEtc(pFormatEtc, nNumFormats);
 +
 +	return (*ppEnumFormatEtc) ? S_OK : E_OUTOFMEMORY;
 +}
 +
 +//
 +//	Helper function to perform a "deep" copy of a FORMATETC
 +//
 +static void DeepCopyFormatEtc(FORMATETC *dest, FORMATETC *source)
 +{
 +	// copy the source FORMATETC into dest
 +	*dest = *source;
 +	
 +	if(source->ptd)
 +	{
 +		// allocate memory for the DVTARGETDEVICE if necessary
 +		dest->ptd = (DVTARGETDEVICE*)CoTaskMemAlloc(sizeof(DVTARGETDEVICE));
 +
 +		// copy the contents of the source DVTARGETDEVICE into dest->ptd
 +		*(dest->ptd) = *(source->ptd);
 +	}
 +}
 +
 +//
 +//	Constructor 
 +//
 +CEnumFormatEtc::CEnumFormatEtc(FORMATETC *pFormatEtc, int nNumFormats)
 +{
 +	m_lRefCount   = 1;
 +	m_nIndex      = 0;
 +	m_nNumFormats = nNumFormats;
 +	m_pFormatEtc  = new FORMATETC[nNumFormats];
 +	
 +	// copy the FORMATETC structures
 +	for(int i = 0; i < nNumFormats; i++)
 +	{	
 +		DeepCopyFormatEtc(&m_pFormatEtc[i], &pFormatEtc[i]);
 +	}
 +}
 +
 +//
 +//	Destructor
 +//
 +CEnumFormatEtc::~CEnumFormatEtc()
 +{
 +	if(m_pFormatEtc)
 +	{
 +		for(ULONG i = 0; i < m_nNumFormats; i++)
 +		{
 +			if(m_pFormatEtc[i].ptd)
 +				CoTaskMemFree(m_pFormatEtc[i].ptd);
 +		}
 +
 +		delete[] m_pFormatEtc;
 +	}
 +}
 +
 +//
 +//	IUnknown::AddRef
 +//
 +ULONG __stdcall CEnumFormatEtc::AddRef(void)
 +{
 +    // increment object reference count
 +    return InterlockedIncrement(&m_lRefCount);
 +}
 +
 +//
 +//	IUnknown::Release
 +//
 +ULONG __stdcall CEnumFormatEtc::Release(void)
 +{
 +    // decrement object reference count
 +	LONG count = InterlockedDecrement(&m_lRefCount);
 +		
 +	if(count == 0)
 +	{
 +		delete this;
 +		return 0;
 +	}
 +	else
 +	{
 +		return count;
 +	}
 +}
 +
 +//
 +//	IUnknown::QueryInterface
 +//
 +HRESULT __stdcall CEnumFormatEtc::QueryInterface(REFIID iid, void **ppvObject)
 +{
 +    // check to see what interface has been requested
 +    if(iid == IID_IEnumFORMATETC || iid == IID_IUnknown)
 +    {
 +        AddRef();
 +        *ppvObject = this;
 +        return S_OK;
 +    }
 +    else
 +    {
 +        *ppvObject = 0;
 +        return E_NOINTERFACE;
 +    }
 +}
 +
 +//
 +//	IEnumFORMATETC::Next
 +//
 +//	If the returned FORMATETC structure contains a non-null "ptd" member, then
 +//  the caller must free this using CoTaskMemFree (stated in the COM documentation)
 +//
 +HRESULT __stdcall CEnumFormatEtc::Next(ULONG celt, FORMATETC *pFormatEtc, ULONG * pceltFetched)
 +{
 +	ULONG copied  = 0;
 +
 +	// validate arguments
 +	if(celt == 0 || pFormatEtc == 0)
 +		return E_INVALIDARG;
 +
 +	// copy FORMATETC structures into caller's buffer
 +	while(m_nIndex < m_nNumFormats && copied < celt)
 +	{
 +		DeepCopyFormatEtc(&pFormatEtc[copied], &m_pFormatEtc[m_nIndex]);
 +		copied++;
 +		m_nIndex++;
 +	}
 +
 +	// store result
 +	if(pceltFetched != 0) 
 +		*pceltFetched = copied;
 +
 +	// did we copy all that was requested?
 +	return (copied == celt) ? S_OK : S_FALSE;
 +}
 +
 +//
 +//	IEnumFORMATETC::Skip
 +//
 +HRESULT __stdcall CEnumFormatEtc::Skip(ULONG celt)
 +{
 +	m_nIndex += celt;
 +	return (m_nIndex <= m_nNumFormats) ? S_OK : S_FALSE;
 +}
 +
 +//
 +//	IEnumFORMATETC::Reset
 +//
 +HRESULT __stdcall CEnumFormatEtc::Reset(void)
 +{
 +	m_nIndex = 0;
 +	return S_OK;
 +}
 +
 +//
 +//	IEnumFORMATETC::Clone
 +//
 +HRESULT __stdcall CEnumFormatEtc::Clone(IEnumFORMATETC ** ppEnumFormatEtc)
 +{
 +	HRESULT hResult;
 +
 +	// make a duplicate enumerator
 +	hResult = CreateEnumFormatEtc(m_nNumFormats, m_pFormatEtc, ppEnumFormatEtc);
 +
 +	if(hResult == S_OK)
 +	{
 +		// manually set the index state
 +		((CEnumFormatEtc *) *ppEnumFormatEtc)->m_nIndex = m_nIndex;
 +	}
 +
 +	return hResult;
 +}
 +
 diff --git a/mTextControl/src/fancy_rtf.cpp b/mTextControl/src/fancy_rtf.cpp new file mode 100644 index 0000000..01ad6bc --- /dev/null +++ b/mTextControl/src/fancy_rtf.cpp @@ -0,0 +1,179 @@ +#include "headers.h"
 +
 +struct BBCodeInfo
 +{
 +	TCHAR *start;
 +	TCHAR *end;
 +	bool (* func)(IFormattedTextDraw *ftd, CHARRANGE range, TCHAR *txt, DWORD cookie);
 +	DWORD cookie;
 +};
 +
 +enum { BBS_BOLD_S, BBS_BOLD_E, BBS_ITALIC_S, BBS_ITALIC_E, BBS_UNDERLINE_S, BBS_UNDERLINE_E,
 +	BBS_STRIKEOUT_S, BBS_STRIKEOUT_E, BBS_COLOR_S, BBS_COLOR_E, BBS_URL1, BBS_URL2,
 +	BBS_IMG1, BBS_IMG2 };
 +
 +static bool bbCodeSimpleFunc(IFormattedTextDraw *ftd, CHARRANGE range, TCHAR *txt, DWORD cookie)
 +{
 +	CHARFORMAT cf = {0};
 +	cf.cbSize = sizeof(cf);
 +	switch (cookie)
 +	{
 +		case BBS_BOLD_S:
 +			cf.dwMask = CFM_BOLD;
 +			cf.dwEffects = CFE_BOLD;
 +			break;
 +		case BBS_BOLD_E:
 +			cf.dwMask = CFM_BOLD;
 +			break;
 +		case BBS_ITALIC_S:
 +			cf.dwMask = CFM_ITALIC;
 +			cf.dwEffects = CFE_ITALIC;
 +			break;
 +		case BBS_ITALIC_E:
 +			cf.dwMask = CFM_ITALIC;
 +			break;
 +		case BBS_UNDERLINE_S:
 +			cf.dwMask = CFM_UNDERLINE;
 +			cf.dwEffects = CFE_UNDERLINE;
 +			break;
 +		case BBS_UNDERLINE_E:
 +			cf.dwMask = CFM_UNDERLINE;
 +			break;
 +		case BBS_STRIKEOUT_S:
 +			cf.dwMask = CFM_STRIKEOUT;
 +			cf.dwEffects = CFE_STRIKEOUT;
 +			break;
 +		case BBS_STRIKEOUT_E:
 +			cf.dwMask = CFM_STRIKEOUT;
 +			break;
 +	}
 +
 +	ITextServices *ts = ftd->getTextService();
 +
 +	LRESULT lResult;
 +	ts->TxSendMessage(EM_SETSEL, range.cpMin, -1, &lResult);
 +	ts->TxSendMessage(EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf, &lResult);
 +	ts->TxSendMessage(EM_SETSEL, range.cpMin, range.cpMax, &lResult);
 +	ts->TxSendMessage(EM_REPLACESEL, FALSE, (LPARAM)_T(""), &lResult);
 +
 +	return true;
 +}
 +
 +static bool bbCodeImageFunc(IFormattedTextDraw *ftd, CHARRANGE range, TCHAR *txt, DWORD cookie)
 +{
 +	ITextServices *ts = ftd->getTextService();
 +	ITextDocument *td = ftd->getTextDocument();
 +
 +	long cnt;
 +	LRESULT lResult;
 +/*
 +	TEXTRANGE trg;
 +	trg.chrg = range;
 +	trg.lpstrText = new TCHAR[trg.chrg.cpMax - trg.chrg.cpMin + 1];
 +	ts->TxSendMessage(EM_GETTEXTRANGE, 0, (LPARAM)&trg, &lResult);
 +	MessageBox(0, txt, trg.lpstrText, MB_OK);
 +*/
 +	ts->TxSendMessage(EM_SETSEL, range.cpMin, range.cpMax, &lResult);
 +	IRichEditOle* RichEditOle;
 +	ts->TxSendMessage(EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle, &lResult);
 +	td->Freeze(&cnt);
 +//	HDC emfdc = CreateEnhMetaFile(NULL, NULL, NULL, _T("icon"));
 +//	DrawIconEx(emfdc, 0, 0, (HICON)_ttol(txt), 16, 16, 0, NULL, DI_NORMAL);
 +//	InsertBitmap(RichEditOle, CloseEnhMetaFile(emfdc));
 +#ifdef _WIN64
 +	bool res = InsertBitmap(RichEditOle, CacheIconToEmf((HICON)_tstoi64(txt)));
 +#else
 +	bool res = InsertBitmap(RichEditOle, CacheIconToEmf((HICON)_ttoi(txt)));
 +#endif
 +
 +	td->Unfreeze(&cnt);
 +	RichEditOle->Release();
 +	return res;
 +}
 +
 +static BBCodeInfo bbCodes[] =
 +{
 +	{ _T("[b]"),      0,           bbCodeSimpleFunc, BBS_BOLD_S },
 +	{ _T("[/b]"),     0,           bbCodeSimpleFunc, BBS_BOLD_E },
 +	{ _T("[i]"),      0,           bbCodeSimpleFunc, BBS_ITALIC_S },
 +	{ _T("[/i]"),     0,           bbCodeSimpleFunc, BBS_ITALIC_E },
 +	{ _T("[u]"),      0,           bbCodeSimpleFunc, BBS_UNDERLINE_S },
 +	{ _T("[/u]"),     0,           bbCodeSimpleFunc, BBS_UNDERLINE_E },
 +	{ _T("[s]"),      0,           bbCodeSimpleFunc, BBS_STRIKEOUT_S },
 +	{ _T("[/s]"),     0,           bbCodeSimpleFunc, BBS_STRIKEOUT_E },
 +
 +//	{ _T("[color="),  _T("]"),     bbCodeSimpleFunc, BBS_COLOR_S },
 +//	{ _T("[/color]"), 0,           bbCodeSimpleFunc, BBS_COLOR_E }
 +
 +	{ _T("[$hicon="),  _T("$]"),   bbCodeImageFunc,  0 }
 +
 +//	{ _T("[url]"),   _T("[/url]"), bbCodeSimpleFunc, BBS_URL1 },
 +//	{ _T("[url="),    _T("]"),     bbCodeSimpleFunc, BBS_URL2 },
 +//	{ _T("[url]"),   _T("[/url]"), bbCodeSimpleFunc, BBS_IMG1 },
 +//	{ _T("[url="),    _T("]"),     bbCodeSimpleFunc, BBS_IMG2 },
 +};
 +static int bbCodeCount = sizeof(bbCodes) / sizeof(*bbCodes);
 +
 +void bbCodeParse(IFormattedTextDraw *ftd)
 +{
 +	ITextServices *ts = ftd->getTextService();
 +	LRESULT lResult;
 +
 +	int pos = 0;
 +	for (bool found = true; found; )
 +	{
 +		found = false;
 +		CHARRANGE fRange; fRange.cpMin = -1;
 +		TCHAR *fText = 0;
 +		BBCodeInfo *fBBCode;
 +
 +		for (int i = 0; i < bbCodeCount; i++)
 +		{
 +			CHARRANGE range;
 +
 +			FINDTEXTEX fte;
 +			fte.chrg.cpMin = pos;
 +			fte.chrg.cpMax = -1;
 +
 +			fte.lpstrText = bbCodes[i].start;
 +			ts->TxSendMessage(EM_FINDTEXTEX, (WPARAM)FR_DOWN, (LPARAM)&fte, &lResult);
 +			if (lResult == -1)
 +				continue;
 +			range = fte.chrgText;
 +
 +			if (bbCodes[i].end)
 +			{
 +				fte.chrg.cpMin = fte.chrgText.cpMax;
 +				fte.lpstrText = bbCodes[i].end;
 +				ts->TxSendMessage(EM_FINDTEXTEX, (WPARAM)FR_DOWN, (LPARAM)&fte, &lResult);
 +				if (lResult == -1)
 +					continue;
 +				range.cpMax = fte.chrgText.cpMax;
 +			}
 +
 +			if ((fRange.cpMin == -1) || (fRange.cpMin > range.cpMin))
 +			{
 +				fRange = range;
 +				fBBCode = bbCodes+i;
 +				found = true;
 +
 +				if (fText) delete [] fText;
 +				if (bbCodes[i].end)
 +				{
 +					TEXTRANGE trg;
 +					trg.chrg.cpMin = fte.chrg.cpMin;
 +					trg.chrg.cpMax = fte.chrgText.cpMin;
 +					trg.lpstrText = new TCHAR[trg.chrg.cpMax - trg.chrg.cpMin + 1];
 +					ts->TxSendMessage(EM_GETTEXTRANGE, 0, (LPARAM)&trg, &lResult);
 +					fText = trg.lpstrText;
 +				}
 +			}
 +		}
 +
 +		if (found)
 +		{
 +			found = fBBCode->func(ftd, fRange, fText, fBBCode->cookie);
 +			if (fText) delete [] fText;
 +		}
 +	}
 +}
 diff --git a/mTextControl/src/fancy_rtf.h b/mTextControl/src/fancy_rtf.h new file mode 100644 index 0000000..ed1fcb1 --- /dev/null +++ b/mTextControl/src/fancy_rtf.h @@ -0,0 +1,6 @@ +#ifndef __fancy_rtf_h__
 +#define __fancy_rtf_h__
 +
 +void bbCodeParse(IFormattedTextDraw *ts);
 +
 +#endif // __fancy_rtf_h__
 diff --git a/mTextControl/src/headers.h b/mTextControl/src/headers.h new file mode 100644 index 0000000..cc2f457 --- /dev/null +++ b/mTextControl/src/headers.h @@ -0,0 +1,125 @@ +/*
 +Miranda Text Control - Plugin for Miranda IM
 +Copyright (C) 2005 Victor Pavlychko (nullbie@gmail.com)
 +
 +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
 +*/
 +
 +#ifndef __headers_h__
 +#define __headers_h__
 +
 +#if defined(UNICODE) && !defined(_UNICODE)
 +	#define _UNICODE
 +#elif defined(_UNICODE) && !defined(UNICODE)
 +	#define UNICODE
 +#endif
 +
 +#ifndef UNICODE
 +	#define OLE2ANSI
 +#elif defined(OLE2ANSI)
 +	#undef OLE2ANSI
 +#endif
 +
 +#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_plugins.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
 +
 +#ifndef MTEXT_NOHELPERS
 +	#define MTEXT_NOHELPERS
 +#endif // MTEXT_NOHELPERS
 +	#include "m_text.h"
 +
 +// API for other plugins
 +//	#include "../api/m_popup.h"
 +//	#include "../api/m_popupw.h"
 +	#include "m_mathmodule.h"
 +	#include <m_smileyadd.h>
 +//	#include "../api/m_nconvers.h"
 +//	#include "../api/m_ticker.h"
 +//	#include "../api/m_avatars.h"
 +#ifdef _cplusplus
 +};
 +#endif
 +
 +// globals
 +extern HINSTANCE		hInst;
 +extern PLUGININFO		pluginInfo;
 +extern PLUGININFOEX		pluginInfoEx;
 +
 +// dlls
 +//#include "dlls.h"
 +
 +// Project headers
 +#include "version.h"
 +//#include "gdiutils.h"
 +//#include "bitmap_funcs.h"
 +//#include "icons.h"
 +#include "services.h"
 +#include "textusers.h"
 +//#include "options.h"
 +#include "richeditutils.h"
 +//#include "IconOleObject.h"
 +#include "ImageDataObjectHlp.h"
 +#include "FormattedTextDraw.h"
 +#include "fancy_rtf.h"
 +//#include "fancy.h"
 +#include "textcontrol.h"
 +
 +#endif // __headers_h__
 diff --git a/mTextControl/src/main.cpp b/mTextControl/src/main.cpp new file mode 100644 index 0000000..16dbc20 --- /dev/null +++ b/mTextControl/src/main.cpp @@ -0,0 +1,143 @@ +/*
 +Miranda Text Control - Plugin for Miranda IM
 +
 +Copyright	© 2005 Victor Pavlychko (nullbie@gmail.com),
 +			© 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: main.cpp $
 +Revision       : $Revision: $
 +Last change on : $Date: 2010-07-03 15:25:00 $
 +Last change by : $Author: Merlin_de $
 +
 +===============================================================================
 +*/
 +
 +#include "headers.h"
 +
 +HINSTANCE hInst = 0;
 +PLUGINLINK *pluginLink = 0;
 +
 +HMODULE hMsfteditDll = 0;
 +HRESULT	(WINAPI *MyCreateTextServices)(IUnknown *punkOuter, ITextHost *pITextHost, IUnknown **ppUnk);
 +
 +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,
 +	UNICODE_AWARE,
 +	0,
 +	MTEXT_UUID
 +};
 +
 +PLUGININFO pluginInfo =
 +{
 +	sizeof(PLUGININFO),
 +	pluginInfoEx.shortName,
 +	pluginInfoEx.version,
 +	pluginInfoEx.description,
 +	pluginInfoEx.author,
 +	pluginInfoEx.authorEmail,
 +	pluginInfoEx.copyright,
 +	pluginInfoEx.homepage,
 +	pluginInfoEx.flags,
 +	pluginInfoEx.replacesDefaultModule
 +};
 +
 +extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
 +{
 +	hInst=hinstDLL;
 +	return TRUE;
 +}
 +
 +static HANDLE hModulesLoaded = 0;
 +static int ModulesLoaded(WPARAM wParam,LPARAM lParam);
 +
 +extern "C" __declspec(dllexport) PLUGININFO *MirandaPluginInfo(DWORD mirandaVersion)
 +{
 +	pluginInfo.cbSize = sizeof(PLUGININFO);
 +	return &pluginInfo;
 +}
 +
 +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
 +{
 +	pluginInfoEx.cbSize = sizeof(PLUGININFOEX);
 +	return &pluginInfoEx;
 +}
 +
 +extern "C" __declspec(dllexport) const MUUID *MirandaPluginInterfaces(void)
 +{
 +	static const MUUID interfaces[] = { MTEXT_UUID, MIID_LAST };
 +	return interfaces;
 +}
 +
 +extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
 +{
 +	pluginLink = link;
 +
 +	//6.0A SDK is missing RichEd20.lib for x64
 +	//http://connect.microsoft.com/VisualStudio/feedback/details/551071/the-6-0a-sdk-is-missing-riched20-lib-for-x64
 +	MyCreateTextServices = 0;
 +	hMsfteditDll = LoadLibrary(_T("msftedit.dll"));
 +	if (hMsfteditDll) {
 +		MyCreateTextServices = (HRESULT (WINAPI *)(
 +			IUnknown *punkOuter,
 +			ITextHost *pITextHost,
 +			IUnknown **ppUnk))
 +			GetProcAddress(hMsfteditDll, "CreateTextServices");
 +	}
 +
 +//	LoadFancy();
 +	LoadEmfCache();
 +	LoadRichEdit();
 +	LoadTextUsers();
 +	LoadServices();
 +	//LoadOptions();
 +
 +	MTextControl_RegisterClass();
 +	hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
 +	return 0;
 +}
 +
 +static int ModulesLoaded(WPARAM wParam,LPARAM lParam)
 +{
 +//	char fn[MAX_PATH+1];
 +//	GetModuleFileName(hInst, fn, MAX_PATH);
 +//	InitFancy();
 +//	InitIcons(icons, fn, iconCount);
 +	return 0;
 +}
 +
 +extern "C" __declspec(dllexport) int Unload(void)
 +{
 +	UnhookEvent(hModulesLoaded);
 +//	UnloadOptions();
 +	UnloadServices();
 +	UnloadTextUsers();
 +	UnloadRichEdit();
 +	UnloadEmfCache();
 +//	UnloadFancy();
 +	FreeLibrary(hMsfteditDll);
 +	return 0;
 +}
 diff --git a/mTextControl/src/richeditutils.cpp b/mTextControl/src/richeditutils.cpp new file mode 100644 index 0000000..28a2676 --- /dev/null +++ b/mTextControl/src/richeditutils.cpp @@ -0,0 +1,164 @@ +#include "headers.h"
 +
 +class CREOleCallback: public IRichEditOleCallback
 +{
 +private:
 +	unsigned refCount;
 +	IStorage *pictStg;
 +	int nextStgId;
 +public:
 +	CREOleCallback()
 +	{
 +		refCount = 1;
 +		pictStg = 0;
 +		nextStgId = 0;
 +	}
 +
 +	HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID * ppvObj)
 +	{
 +		if (IsEqualIID(riid, IID_IRichEditOleCallback))
 +		{
 +			*ppvObj = this;
 +			this->AddRef();
 +			return S_OK;
 +		}
 +		*ppvObj = NULL;
 +		return E_NOINTERFACE;
 +	}
 +
 +	ULONG STDMETHODCALLTYPE AddRef()
 +	{
 +		if (this->refCount == 0) {
 +			if (S_OK != StgCreateDocfile(NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_DELETEONRELEASE, 0, &this->pictStg))
 +	            this->pictStg = NULL;
 +			this->nextStgId = 0;
 +	    }
 +	    return ++this->refCount;
 +	}
 +
 +	ULONG STDMETHODCALLTYPE Release()
 +	{
 +	    if (--this->refCount == 0) {
 +	        if (this->pictStg)
 +				this->pictStg->Release();
 +	    }
 +	    return this->refCount;
 +	}
 +
 +	HRESULT STDMETHODCALLTYPE  ContextSensitiveHelp(BOOL fEnterMode)
 +	{
 +	    return S_OK;
 +	}
 +
 +	HRESULT STDMETHODCALLTYPE  DeleteObject(LPOLEOBJECT lpoleobj)
 +	{
 +	    return S_OK;
 +	}
 +
 +	HRESULT STDMETHODCALLTYPE  GetClipboardData(CHARRANGE * lpchrg, DWORD reco, LPDATAOBJECT * lplpdataobj)
 +	{
 +	    return E_NOTIMPL;
 +	}
 +
 +	HRESULT STDMETHODCALLTYPE  GetContextMenu(WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE * lpchrg, HMENU * lphmenu)
 +	{
 +	    return E_INVALIDARG;
 +	}
 +
 +	HRESULT STDMETHODCALLTYPE  GetDragDropEffect(BOOL fDrag, DWORD grfKeyState, LPDWORD pdwEffect)
 +	{
 +	    return S_OK;
 +	}
 +
 +	HRESULT STDMETHODCALLTYPE  GetInPlaceContext(LPOLEINPLACEFRAME * lplpFrame, LPOLEINPLACEUIWINDOW * lplpDoc, LPOLEINPLACEFRAMEINFO lpFrameInfo)
 +	{
 +	    return E_INVALIDARG;
 +	}
 +
 +	HRESULT STDMETHODCALLTYPE  GetNewStorage(LPSTORAGE * lplpstg)
 +	{
 +		WCHAR szwName[64];
 +		char szName[64];
 +		wsprintfA(szName, "s%u", this->nextStgId);
 +		MultiByteToWideChar(CP_ACP, 0, szName, -1, szwName, sizeof(szwName) / sizeof(szwName[0]));
 +		if (this->pictStg == NULL)
 +			return STG_E_MEDIUMFULL;
 +#ifdef UNICODE
 +	    return this->pictStg->CreateStorage(szwName, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, 0, lplpstg);
 +#else
 +	    return this->pictStg->CreateStorage(szName, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, 0, lplpstg);
 +#endif
 +	}
 +
 +	HRESULT STDMETHODCALLTYPE  QueryAcceptData(LPDATAOBJECT lpdataobj, CLIPFORMAT * lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict)
 +	{
 +		return S_OK;
 +	}
 +
 +	HRESULT STDMETHODCALLTYPE  QueryInsertObject(LPCLSID lpclsid, LPSTORAGE lpstg, LONG cp)
 +	{
 +	    return S_OK;
 +	}
 +
 +	HRESULT STDMETHODCALLTYPE  ShowContainerUI(BOOL fShow)
 +	{
 +	    return S_OK;
 +	}
 +};
 +
 +IRichEditOleCallback *reOleCallback = 0;
 +
 +void InitRichEdit(ITextServices *ts)
 +{
 +	LRESULT lResult;
 +	ts->TxSendMessage(EM_SETOLECALLBACK, 0, (LPARAM)reOleCallback, &lResult);
 +}
 +
 +LRESULT CALLBACK RichEditProxyWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 +{
 +	ITextServices *ts = (ITextServices *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
 +	if (ts && (msg != WM_DESTROY))
 +	{
 +		LRESULT lResult;
 +		ts->TxSendMessage(msg, wParam, lParam, &lResult);
 +		return lResult;
 +	}
 +	return 1;
 +}
 +
 +void LoadRichEdit()
 +{
 +	OleInitialize(NULL);
 +//	LoadLibrary("riched20.dll");
 +	reOleCallback = new CREOleCallback;
 +//	CoInitializeEx(NULL,COINIT_MULTITHREADED);
 +
 +
 +	WNDCLASSEX wcl;
 +	wcl.cbSize = sizeof(wcl);
 +	wcl.lpfnWndProc = RichEditProxyWndProc;
 +	wcl.style = CS_GLOBALCLASS;
 +	wcl.cbClsExtra = 0;
 +	wcl.cbWndExtra = 0;
 +	wcl.hInstance = hInst;
 +	wcl.hIcon = NULL;
 +	wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
 +	wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
 +	wcl.lpszMenuName = NULL;
 +	wcl.lpszClassName = _T("NBRichEditProxyWndClass");
 +	wcl.hIconSm = 0; 
 +	RegisterClassEx(&wcl);
 +}
 +
 +void UnloadRichEdit()
 +{
 +	delete reOleCallback;
 +	OleUninitialize();
 +}
 +
 +HWND CreateProxyWindow(ITextServices *ts)
 +{
 +	HWND hwnd = CreateWindow(_T("NBRichEditProxyWndClass"), _T(""), 0, 0, 0, 0, 0, 0, 0, hInst, 0);
 +	SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)ts);
 +	return hwnd;
 +}
 diff --git a/mTextControl/src/richeditutils.h b/mTextControl/src/richeditutils.h new file mode 100644 index 0000000..a459f62 --- /dev/null +++ b/mTextControl/src/richeditutils.h @@ -0,0 +1,12 @@ +#ifndef __richeditutils_h__
 +#define __richeditutils_h__
 +
 +extern IRichEditOleCallback *reOleCallback;
 +
 +void LoadRichEdit();
 +void UnloadRichEdit();
 +
 +void InitRichEdit(ITextServices *ts);
 +HWND CreateProxyWindow(ITextServices *ts);
 +
 +#endif // __richeditutils_h__
 diff --git a/mTextControl/src/services.cpp b/mTextControl/src/services.cpp new file mode 100644 index 0000000..cb0b2a9 --- /dev/null +++ b/mTextControl/src/services.cpp @@ -0,0 +1,382 @@ +/*
 +Miranda Text Control - Plugin for Miranda IM
 +Copyright (C) 2005 Victor Pavlychko (nullbie@gmail.com)
 +
 +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
 +*/
 +
 +#include "headers.h"
 +
 +static HANDLE hService[11] = {0,0,0,0,0,0,0,0,0,0,0};
 +
 +INT_PTR MText_Register(WPARAM, LPARAM);
 +INT_PTR MText_Create(WPARAM, LPARAM);
 +INT_PTR MText_CreateW(WPARAM, LPARAM);
 +INT_PTR MText_CreateEx(WPARAM, LPARAM);
 +INT_PTR MText_Measure(WPARAM, LPARAM);
 +INT_PTR MText_Display(WPARAM, LPARAM);
 +INT_PTR MText_SetParent(WPARAM, LPARAM);
 +INT_PTR MText_SendMessage(WPARAM, LPARAM);
 +INT_PTR MText_CreateProxy(WPARAM, LPARAM);
 +INT_PTR MText_Destroy(WPARAM, LPARAM);
 +INT_PTR MText_GetInterface(WPARAM, LPARAM);
 +
 +struct TextObject
 +{
 +	DWORD options;
 +	IFormattedTextDraw *ftd;
 +	TextObject(): options(0), ftd(0) {}
 +	~TextObject() { if (ftd) delete ftd; }
 +};
 +
 +//---------------------------------------------------------------------------
 +// elper functions
 +void MText_InitFormatting0(IFormattedTextDraw *ftd, DWORD options) {
 +	LRESULT lResult;
 +
 +	// urls
 +	ftd->getTextService()->TxSendMessage(EM_AUTOURLDETECT, TRUE, 0, &lResult);
 +}
 +
 +void MText_InitFormatting1(TextObject *text) {
 +	// bbcodes
 +	bbCodeParse(text->ftd);
 +
 +	// smilies
 +//	HWND hwnd = (HWND)CallServiceSync(MS_TEXT_CREATEPROXY, (WPARAM)text, (LPARAM)0);
 +	HWND hwnd = CreateProxyWindow(text->ftd->getTextService());
 +	SMADD_RICHEDIT3 sm = {0};
 +	sm.cbSize = sizeof(sm);
 +	sm.hwndRichEditControl = hwnd;
 +	sm.rangeToReplace = 0;
 +	sm.Protocolname = 0;
 +	sm.flags = SAFLRE_INSERTEMF;
 +	CallService(MS_SMILEYADD_REPLACESMILEYS, RGB(0xff, 0xff, 0xff), (LPARAM)&sm);
 +	DestroyWindow(hwnd);
 +
 +//	text->ftd->getTextService()->TxSendMessage(EM_SETSEL, 0, -1, &lResult);
 +/*
 +	// rtl stuff
 +	PARAFORMAT2 pf2;
 +	pf2.cbSize = sizeof(pf2);
 +	pf2.dwMask = PFM_ALIGNMENT|PFM_RTLPARA;
 +	pf2.wEffects = PFE_RTLPARA;
 +	pf2.wAlignment = PFA_RIGHT;
 +	text->ftd->getTextService()->TxSendMessage(EM_SETSEL, 0, -1, &lResult);
 +	text->ftd->getTextService()->TxSendMessage(EM_SETPARAFORMAT, 0, (LPARAM)&pf2, &lResult);
 +	text->ftd->getTextService()->TxSendMessage(EM_SETSEL, 0, 0, &lResult);
 +*/
 +}
 +
 +//---------------------------------------------------------------------------
 +// NEW mtextcontrol interface:
 +//
 +// obtain the full mtextcontrol interface from the library. it is much faster as use of 
 +// miranda core CallService to access to mtextcontrol (no core traffic).
 +// This interface provides full access to mtextcontrol internal functions,
 +// thus enabling devs to fully utilize the mtextcontrol API.
 +// All functions will be exported as miranda services for compatibility.
 +//
 +// the interface is populated during the Load(PLUGINLINK *link) handler, so you can assume it is ready when Miranda
 +// throw the ME_SYSTEM_MODULESLOADED event and you can generate a warning in your ModulesLoaded() when
 +// it depends on the mtextcontrol interface and the mtextcontrol plugin is missing.
 +// 
 +// example:
 +// 
 +// MTEXT_INTERFACE MText = {0};
 +// 
 +// 	mir_getMTI(&MText);
 +// 
 +// all interface function designed as old mtextcontrol helper functions.
 +// therefore it is easy to convert your old plugin code to new interface.
 +//
 +// example:
 +//
 +// old code: MTextCreate (...
 +// new code: MText.Create(...
 +
 +//---------------------------------------------------------------------------
 +// subscribe to MText services
 +INT_PTR MText_Register(WPARAM wParam, LPARAM lParam)
 +{
 +	DWORD userOptions = (DWORD)wParam;
 +	char *userTitle = (char *)lParam;
 +	return (INT_PTR)MTI_TextUserAdd(userTitle, userOptions);
 +}
 +
 +//---------------------------------------------------------------------------
 +// allocate text object
 +HANDLE DLL_CALLCONV 
 +MTI_MTextCreate (HANDLE userHandle, char *text) {
 +	TextObject *result = new TextObject;
 +	result->options = TextUserGetOptions(userHandle);
 +	result->ftd = new CFormattedTextDraw;
 +	result->ftd->Create();
 +	InitRichEdit(result->ftd->getTextService());
 +
 +	MText_InitFormatting0(result->ftd, result->options);
 +	result->ftd->putTextA(text);
 +	MText_InitFormatting1(result);
 +
 +	return (HANDLE)result;
 +}
 +
 +INT_PTR MText_Create(WPARAM wParam, LPARAM lParam) {
 +	//HANDLE userHandle = (HANDLE)wParam;
 +	//char *text = (char *)lParam;
 +	return (INT_PTR)MTI_MTextCreate ((HANDLE)wParam, (char *)lParam);
 +}
 +
 +//---------------------------------------------------------------------------
 +// allocate text object (unicode)
 +HANDLE DLL_CALLCONV 
 +MTI_MTextCreateW (HANDLE userHandle, WCHAR *text) {
 +#ifdef UNICODE
 +	TextObject *result = new TextObject;
 +	result->options = TextUserGetOptions(userHandle);
 +	result->ftd = new CFormattedTextDraw;
 +	result->ftd->Create();
 +	InitRichEdit(result->ftd->getTextService());
 +
 +	MText_InitFormatting0(result->ftd, result->options);
 +	result->ftd->putTextW(text);
 +	MText_InitFormatting1(result);
 +
 +	return (HANDLE)result;
 +#else
 +	return 0;
 +#endif
 +}
 +
 +INT_PTR MText_CreateW(WPARAM wParam, LPARAM lParam) {
 +#ifdef UNICODE
 +	//HANDLE userHandle = (HANDLE)wParam;
 +	//WCHAR *wtext = (WCHAR *)lParam;
 +	return (INT_PTR)(HANDLE)MTI_MTextCreateW ((HANDLE)wParam, (WCHAR *)lParam);
 +#else
 +	return 0;
 +#endif
 +}
 +
 +//---------------------------------------------------------------------------
 +// allocate text object (advanced)
 +HANDLE DLL_CALLCONV 
 +MTI_MTextCreateEx (HANDLE userHandle, HANDLE hContact, void *text, DWORD flags) {
 +	TextObject *result = new TextObject;
 +	result->options = TextUserGetOptions(userHandle);
 +	result->ftd = new CFormattedTextDraw;
 +	result->ftd->Create();
 +	InitRichEdit(result->ftd->getTextService());
 +
 +	MText_InitFormatting0(result->ftd, result->options);
 +	if (flags & MTEXT_FLG_WCHAR) result->ftd->putTextW((WCHAR *)text);
 +	else result->ftd->putTextA((char *)text);
 +	MText_InitFormatting1(result);
 +
 +	return 0;
 +}
 +
 +INT_PTR MText_CreateEx(WPARAM wParam, LPARAM lParam) {
 +	HANDLE userHandle = (HANDLE)wParam;
 +	MTEXTCREATE *textCreate = (MTEXTCREATE *)lParam;
 +	MTI_MTextCreateEx (userHandle, textCreate->hContact, textCreate->text, textCreate->flags);
 +	return 0;
 +}
 +
 +//---------------------------------------------------------------------------
 +// measure text object
 +int DLL_CALLCONV 
 +MTI_MTextMeasure (HDC dc, SIZE *sz, HANDLE text) {
 +	if (!text) return 0;
 +
 +	long lWidth=sz->cx, lHeight=sz->cy;
 +	((TextObject *)text)->ftd->get_NaturalSize(dc, &lWidth, &lHeight);
 +	sz->cx = lWidth;
 +	sz->cy = lHeight;
 +//	FancyMeasure(((TextObject *)text)->fancy, displayInfo);
 +
 +	return 0;
 +}
 +
 +INT_PTR MText_Measure(WPARAM wParam, LPARAM lParam) {
 +	LPMTEXTDISPLAY displayInfo = (LPMTEXTDISPLAY)wParam;
 +	if (!displayInfo) return 0;
 +	if (!(TextObject *)displayInfo->text) return 0;
 +	MTI_MTextMeasure (displayInfo->dc, &displayInfo->sz, displayInfo->text);
 +	return 0;
 +}
 +
 +int DLL_CALLCONV 
 +//---------------------------------------------------------------------------
 +// display text object
 +MTI_MTextDisplay (HDC dc, POINT pos, SIZE sz, HANDLE text) {
 +	if (!text) return 0;
 +
 +	COLORREF cl = GetTextColor(dc);
 +//	if (GetTextColor(dc)&0xffffff != 0)
 +	{
 +		LRESULT lResult;
 +		CHARFORMAT cf = {0};
 +		cf.cbSize = sizeof(cf);
 +		cf.dwMask = CFM_COLOR;
 +		cf.crTextColor = cl;
 +		((TextObject *)text)->ftd->getTextService()->TxSendMessage(EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf, &lResult);
 +	}
 +
 +	SetBkMode(dc, TRANSPARENT);
 +
 +	long lWidth=sz.cx, lHeight;
 +	((TextObject *)text)->ftd->get_NaturalSize(dc, &lWidth, &lHeight);
 +	RECT rt;
 +	rt.left = pos.x;
 +	rt.top = pos.y;
 +	rt.right = pos.x + lWidth;
 +	rt.bottom = pos.y + lHeight;
 +	((TextObject *)text)->ftd->Draw(dc, &rt);
 +
 +	return 0;
 +}
 +
 +INT_PTR MText_Display(WPARAM wParam, LPARAM lParam) {
 +	LPMTEXTDISPLAY displayInfo = (LPMTEXTDISPLAY)wParam;
 +	if (!displayInfo) return 0;
 +	if (!displayInfo->text) return 0;
 +	MTI_MTextDisplay (displayInfo->dc, displayInfo->pos, displayInfo->sz, displayInfo->text);
 +	return 0;
 +}
 +
 +int DLL_CALLCONV 
 +//---------------------------------------------------------------------------
 +// set parent window for text object (this is required for mouse handling, etc)
 +MTI_MTextSetParent (HANDLE text, HWND hwnd, RECT rect) {
 +	if (!text) return 0;
 +	((TextObject *)text)->ftd->setParentWnd(hwnd, rect);
 +	return 0;
 +}
 +
 +INT_PTR MText_SetParent(WPARAM wParam, LPARAM lParam) {
 +	LPMTEXTSETPARENT info = (LPMTEXTSETPARENT)wParam;
 +	//TextObject *text = (TextObject *)info->text;
 +	if (!info) return 0;
 +	if (!info->text) return 0;
 +	MTI_MTextSetParent (info->text, info->hwnd, info->rc);
 +	return 0;
 +}
 +
 +//---------------------------------------------------------------------------
 +// send message to an object
 +int DLL_CALLCONV 
 +MTI_MTextSendMessage (HWND hwnd, HANDLE text, UINT msg, WPARAM wParam, LPARAM lParam) {
 +	LRESULT lResult;
 +	if (!text) return 0;
 +	((TextObject *)text)->ftd->getTextService()->TxSendMessage(msg, wParam, lParam, &lResult);
 +
 +	if (hwnd && (msg == WM_MOUSEMOVE)) {
 +		HDC hdc = GetDC(hwnd);
 +		((TextObject *)text)->ftd->getTextService()->OnTxSetCursor(DVASPECT_CONTENT, 0, NULL, NULL, hdc, NULL, NULL, LOWORD((LPARAM)0), HIWORD((LPARAM)0));
 +		ReleaseDC(hwnd, hdc);
 +	}
 +
 +	return lResult;
 +}
 +
 +INT_PTR MText_SendMessage(WPARAM wParam, LPARAM lParam) {
 +	LPMTEXTMESSAGE message = (LPMTEXTMESSAGE)wParam;
 +	TextObject *text = (TextObject *)message->text;
 +	if (!message->text) return 0;
 +	return (INT_PTR)MTI_MTextSendMessage (message->hwnd, message->text, message->msg, message->wParam, message->lParam);
 +}
 +
 +//---------------------------------------------------------------------------
 +// create a proxy window
 +HWND DLL_CALLCONV 
 +MTI_MTextCreateProxy (HANDLE text) {
 +	if (!text) return 0;
 +	return CreateProxyWindow(((TextObject *)text)->ftd->getTextService());
 +}
 +
 +INT_PTR MText_CreateProxy(WPARAM wParam, LPARAM lParam) {
 +	if (!wParam) return 0;
 +	return (INT_PTR)MTI_MTextCreateProxy((HANDLE)wParam);
 +}
 +
 +int DLL_CALLCONV 
 +//---------------------------------------------------------------------------
 +// destroy text object
 +MTI_MTextDestroy (HANDLE text) {
 +	//HANDLE textHandle = (HANDLE)wParam;
 +	//TextObject *text = (TextObject *)textHandle;
 +	if (text) delete (TextObject *)text;
 +	return 0;
 +}
 +
 +INT_PTR MText_Destroy(WPARAM wParam, LPARAM lParam) {
 +	HANDLE textHandle = (HANDLE)wParam;
 +	TextObject *text = (TextObject *)textHandle;
 +	if (text) delete text;
 +	return 0;
 +}
 +
 +//---------------------------------------------------------------------------
 +// populate the interface
 +INT_PTR MText_GetInterface(WPARAM wParam, LPARAM lParam) {
 +	MTEXT_INTERFACE *MText = (MTEXT_INTERFACE *)lParam;
 +	if ( MText == NULL )
 +		return CALLSERVICE_NOTFOUND;
 +
 +	MText->version		= pluginInfo.version;
 +	MText->Register		= MTI_TextUserAdd;
 +	MText->Create		= MTI_MTextCreate;
 +	MText->CreateW		= MTI_MTextCreateW;
 +//	MText->CreateT		= defined inside api
 +	MText->CreateEx		= MTI_MTextCreateEx;
 +	MText->Measure		= MTI_MTextMeasure;
 +	MText->Display		= MTI_MTextDisplay;
 +	MText->SetParent	= MTI_MTextSetParent;
 +	MText->SendMsg		= MTI_MTextSendMessage;
 +	MText->CreateProxy	= MTI_MTextCreateProxy;
 +	MText->Destroy		= MTI_MTextDestroy;
 +
 +	return S_OK;
 +}
 +
 +//---------------------------------------------------------------------------
 +// Load / Unload services
 +void LoadServices()
 +{
 +	int nService = 0;
 +	hService[nService++] = CreateServiceFunction(MS_TEXT_REGISTER,		MText_Register);
 +	hService[nService++] = CreateServiceFunction(MS_TEXT_CREATE,		MText_Create);
 +#ifdef UNICODE
 +	hService[nService++] = CreateServiceFunction(MS_TEXT_CREATEW,		MText_CreateW);
 +#endif
 +	hService[nService++] = CreateServiceFunction(MS_TEXT_CREATEEX,		MText_CreateEx);
 +	hService[nService++] = CreateServiceFunction(MS_TEXT_MEASURE,		MText_Measure);
 +	hService[nService++] = CreateServiceFunction(MS_TEXT_DISPLAY,		MText_Display);
 +	hService[nService++] = CreateServiceFunction(MS_TEXT_SETPARENT,		MText_SetParent);
 +	hService[nService++] = CreateServiceFunction(MS_TEXT_SENDMESSAGE,	MText_SendMessage);
 +	hService[nService++] = CreateServiceFunction(MS_TEXT_CREATEPROXY,	MText_CreateProxy);
 +	hService[nService++] = CreateServiceFunction(MS_TEXT_DESTROY,		MText_Destroy);
 +	hService[nService++] = CreateServiceFunction(MS_TEXT_GETINTERFACE,	MText_GetInterface);
 +}
 +
 +void UnloadServices()
 +{
 +	int nService = sizeof(hService)/sizeof(*hService);
 +	while (nService--)
 +		if (hService[nService])
 +			DestroyServiceFunction(hService[nService]);
 +}
 +
 diff --git a/mTextControl/src/services.h b/mTextControl/src/services.h new file mode 100644 index 0000000..2891783 --- /dev/null +++ b/mTextControl/src/services.h @@ -0,0 +1,36 @@ +/*
 +Miranda Text Control - Plugin for Miranda IM
 +Copyright (C) 2005 Victor Pavlychko (nullbie@gmail.com)
 +
 +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
 +*/
 +
 +#ifndef __services_h__
 +#define __services_h__
 +
 +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);
 +
 +#endif // __services_h__
 diff --git a/mTextControl/src/textcontrol.cpp b/mTextControl/src/textcontrol.cpp new file mode 100644 index 0000000..29caf2e --- /dev/null +++ b/mTextControl/src/textcontrol.cpp @@ -0,0 +1,200 @@ +/*
 +Miranda Text Control - Plugin for Miranda IM
 +Copyright (C) 2005 Victor Pavlychko (nullbie@gmail.com)
 +
 +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
 +*/
 +
 +#include "headers.h"
 +
 +LRESULT CALLBACK MTextControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
 +LRESULT MTextControl_OnPaint(HWND hwnd, WPARAM wParam, LPARAM lParam);
 +//LRESULT MTextControl_Measure(HWND hwnd, int maxw, SIZE *size);
 +
 +struct TextControlData
 +{
 +	HANDLE htu;
 +	TCHAR *text;
 +	HANDLE mtext;
 +};
 +
 +void MTextControl_RegisterClass()
 +{
 +	WNDCLASSEX wcl;
 +	wcl.cbSize = sizeof(wcl);
 +	wcl.lpfnWndProc = MTextControlWndProc;
 +	wcl.style = CS_GLOBALCLASS;
 +	wcl.cbClsExtra = 0;
 +	wcl.cbWndExtra = 0;
 +	wcl.hInstance = hInst;
 +	wcl.hIcon = NULL;
 +	wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
 +	wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
 +	wcl.lpszMenuName = NULL;
 +	wcl.lpszClassName = _T(MODULNAME);
 +	wcl.hIconSm = 0; 
 +	RegisterClassEx(&wcl);
 +}
 +
 +LRESULT CALLBACK MTextControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 +{
 +	TextControlData *data = (TextControlData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
 +	switch(msg)
 +	{
 +		case WM_CREATE:
 +		{
 +			data = new TextControlData;
 +			data->text = 0;
 +			data->mtext = 0;
 +			data->htu = htuDefault;
 +			SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)data);
 +			PostMessage(hwnd, MTM_UPDATE, 0, 0);
 +			return 0;
 +		}
 +
 +		case MTM_SETUSER:
 +		{
 +			data->htu = wParam ? (HANDLE)wParam : htuDefault;
 +			// falldown, DefWindowProc won't process WM_USER ;)
 +		}
 +
 +		case WM_SETTEXT:
 +		{
 +			DefWindowProc(hwnd, msg, wParam, lParam);
 +			// falldown
 +		}
 +
 +		case MTM_UPDATE:
 +		{
 +			if (data->text) delete [] data->text;
 +			if (data->mtext) MTI_MTextDestroy(data->mtext);
 +
 +			int textLength = GetWindowTextLength(hwnd);
 +			data->text = new TCHAR[textLength+1];
 +			GetWindowText(hwnd, data->text, textLength+1);
 +			#if defined(UNICODE) || defined (_UNICODE)
 +				data->mtext = MTI_MTextCreateW(data->htu, data->text);
 +			#else
 +				data->mtext = MTI_MTextCreate(data->htu, data->text);
 +			#endif
 +
 +			RECT rc; GetClientRect(hwnd, &rc);
 +			MTI_MTextSetParent(data->mtext, hwnd, rc);
 +
 +			InvalidateRect(hwnd, 0, TRUE);
 +
 +			return TRUE;
 +		}
 +
 +		case WM_PAINT:
 +		{
 +			return MTextControl_OnPaint(hwnd, wParam, lParam);
 +		}
 +
 +		case WM_ERASEBKGND:
 +		{
 +			HDC hdc = (HDC)wParam;
 +			RECT rc;
 +			GetClientRect(hwnd, &rc);
 +			FillRect(hdc, &rc,  GetSysColorBrush(COLOR_BTNFACE));
 +			return TRUE;
 +		}
 +
 +//		case WM_NCHITTEST:
 +//		case WM_NCMOUSEMOVE:
 +		case WM_MOUSEMOVE:
 +//		case WM_LBUTTONDOWN:
 +//		case WM_LBUTTONUP:
 +//		case WM_RBUTTONDOWN:
 +//		case WM_RBUTTONUP:
 +		{
 +			if (data && data->mtext)
 +				return MTI_MTextSendMessage(hwnd, data->mtext, msg, wParam, lParam);
 +			break;
 +		}
 +
 +	}
 +
 +	return DefWindowProc(hwnd, msg, wParam, lParam);
 +}
 +
 +/// Paint ////////////////////////////////////
 +LRESULT MTextControl_OnPaint(HWND hwnd, WPARAM wParam, LPARAM lParam)
 +{
 +	HDC hdc;
 +	PAINTSTRUCT ps;
 +	hdc = BeginPaint(hwnd, &ps);
 +
 +	RECT rc;
 +	GetClientRect(hwnd, &rc);
 +	FrameRect(hdc, &rc, (HBRUSH)GetStockObject(BLACK_BRUSH));
 +
 +	SetTextColor(hdc, RGB(0,0,0));
 +	SetBkMode(hdc, TRANSPARENT);
 +
 +	// Find the text to draw
 +	TextControlData *data = (TextControlData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
 +	if (data->mtext)
 +	{
 +/*
 +		// Font-related stuff
 +		LOGFONT lfText;
 +		lfText.lfHeight = -11; //"8" in the font dialog
 +		lfText.lfWidth = lfText.lfEscapement = lfText.lfOrientation = 0;
 +		lfText.lfItalic = lfText.lfUnderline = lfText.lfStrikeOut = FALSE;
 +		lfText.lfCharSet = DEFAULT_CHARSET;
 +		lfText.lfOutPrecision = OUT_DEFAULT_PRECIS;
 +		lfText.lfClipPrecision = CLIP_DEFAULT_PRECIS;
 +		lfText.lfQuality = DEFAULT_QUALITY;
 +		lfText.lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; 
 +		lstrcpy(lfText.lfFaceName,_T("Tahoma"));
 +		lfText.lfWeight = FW_REGULAR;
 +		HFONT hfntSave = (HFONT)SelectObject(hdc, CreateFontIndirect(&lfText));
 +*/
 +
 +		HFONT hfntSave = 0;
 +		HFONT hfnt = (HFONT)SendMessage(hwnd, WM_GETFONT, 0, 0);
 +		if (!hfnt)
 +			hfnt = (HFONT)SendMessage(GetParent(hwnd), WM_GETFONT, 0, 0);
 +		if (hfnt)
 +		{
 +			LOGFONT lf;
 +			GetObject(hfnt, sizeof(lf), &lf);
 +			hfntSave = (HFONT)SelectObject(hdc, hfnt);
 +		}
 +
 +		// Draw the text
 +		RECT rc;
 +		GetClientRect(hwnd, &rc);
 +		POINT pos;
 +		pos.x = 0;
 +		pos.y = 2;
 +		SIZE sz;
 +		sz.cx = rc.right - rc.left;
 +		sz.cy = rc.bottom - rc.top - 4;
 +		MTI_MTextDisplay(hdc, pos, sz, data->mtext);
 +
 +		if (hfntSave)
 +			SelectObject(hdc, hfntSave);
 +	
 +//		DeleteObject(SelectObject(hdc, hfntSave));
 +
 +	}
 +	
 +	// Release the device context
 +	EndPaint(hwnd, &ps);
 +
 +	return 0;
 +}
 diff --git a/mTextControl/src/textcontrol.h b/mTextControl/src/textcontrol.h new file mode 100644 index 0000000..ef69426 --- /dev/null +++ b/mTextControl/src/textcontrol.h @@ -0,0 +1,25 @@ +/*
 +Miranda Text Control - Plugin for Miranda IM
 +Copyright (C) 2005 Victor Pavlychko (nullbie@gmail.com)
 +
 +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
 +*/
 +
 +#ifndef __textcontrol_h__
 +#define __textcontrol_h__
 +
 +void MTextControl_RegisterClass();
 +
 +#endif // __textcontrol_h__
\ No newline at end of file diff --git a/mTextControl/src/textusers.cpp b/mTextControl/src/textusers.cpp new file mode 100644 index 0000000..60b8492 --- /dev/null +++ b/mTextControl/src/textusers.cpp @@ -0,0 +1,88 @@ +/*
 +Miranda Text Control - Plugin for Miranda IM
 +Copyright (C) 2005 Victor Pavlychko (nullbie@gmail.com)
 +
 +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
 +*/
 +
 +#include "headers.h"
 +
 +HANDLE htuDefault = 0;
 +
 +TextUser *textUserFirst=0;
 +TextUser *textUserLast=0;
 +
 +void LoadTextUsers()
 +{
 +	htuDefault = MTI_TextUserAdd("Text Controls", MTEXT_FANCY_MASK);
 +}
 +
 +void UnloadTextUsers()
 +{
 +	while (textUserFirst)
 +	{
 +		delete [] textUserFirst->name;
 +		TextUser *next = textUserFirst->next;
 +		delete [] textUserFirst;
 +		textUserFirst = next;
 +	}
 +}
 +
 +HANDLE DLL_CALLCONV 
 +MTI_TextUserAdd(const char *userTitle, DWORD options)
 +{
 +	TextUser *textUserNew = new TextUser;
 +	textUserNew->name = new char [lstrlenA(userTitle)+1];
 +	lstrcpyA(textUserNew->name, userTitle);
 +	textUserNew->options =
 +		(DBGetContactSettingDword(0, MODULNAME, userTitle, options)&MTEXT_FANCY_MASK) | (textUserNew->options&MTEXT_SYSTEM_MASK);
 +	DBWriteContactSettingDword(0, MODULNAME, userTitle, textUserNew->options);
 +	textUserNew->prev = textUserLast;
 +	textUserNew->next = 0;
 +	if (textUserLast)
 +	{
 +		textUserLast->next = textUserNew;
 +		textUserLast = textUserNew;
 +	} else
 +	{
 +		textUserFirst = textUserLast = textUserNew;
 +	}
 +	return (HANDLE)textUserNew;
 +}
 +
 +DWORD TextUserGetOptions(HANDLE userHandle)
 +{
 +	if (!userHandle) return 0;
 +	return ((TextUser *)userHandle)->options;
 +}
 +
 +void TextUserSetOptions(HANDLE userHandle, DWORD options)
 +{
 +	if (!userHandle) return;
 +	((TextUser *)userHandle)->options = options;
 +}
 +
 +void TextUsersSave()
 +{
 +	for (TextUser *textUser = textUserFirst; textUser; textUser = textUser->next)
 +		DBWriteContactSettingDword(0, MODULNAME, textUser->name, textUser->options);
 +}
 +
 +void TextUsersReset()
 +{
 +	for (TextUser *textUser = textUserFirst; textUser; textUser = textUser->next)
 +		textUser->options =
 +			(DBGetContactSettingDword(0, MODULNAME, textUser->name, 0)&MTEXT_FANCY_MASK) | (textUser->options&MTEXT_SYSTEM_MASK);
 +}
 diff --git a/mTextControl/src/textusers.h b/mTextControl/src/textusers.h new file mode 100644 index 0000000..a0d135b --- /dev/null +++ b/mTextControl/src/textusers.h @@ -0,0 +1,47 @@ +/*
 +Miranda Text Control - Plugin for Miranda IM
 +Copyright (C) 2005 Victor Pavlychko (nullbie@gmail.com)
 +
 +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
 +*/
 +
 +#ifndef __textusers_h__
 +#define __textusers_h__
 +
 +#define MTEXT_GUI_MASK (MTEXT_BIDI_MASK|MTEXT_FANCY_SMILEYS|MTEXT_FANCY_BBCODES|MTEXT_FANCY_MATHMOD)
 +
 +struct TextUser
 +{
 +	char *name;
 +	DWORD options;
 +	TextUser *prev, *next;
 +};
 +
 +extern TextUser *textUserFirst;
 +extern TextUser *textUserLast;
 +
 +void LoadTextUsers();
 +void UnloadTextUsers();
 +
 +extern HANDLE htuDefault;
 +
 +DLL_API HANDLE	DLL_CALLCONV	MTI_TextUserAdd(const char *userTitle, DWORD options);
 +
 +DWORD TextUserGetOptions(HANDLE userHandle);
 +void TextUserSetOptions(HANDLE userHandle, DWORD options);
 +void TextUsersSave();
 +void TextUsersReset();
 +
 +#endif // __textusers_h__
 diff --git a/mTextControl/src/version.h b/mTextControl/src/version.h new file mode 100644 index 0000000..59e8525 --- /dev/null +++ b/mTextControl/src/version.h @@ -0,0 +1,60 @@ +/*
 +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"
 +
 +	#ifdef _UNICODE
 +		#define MTEXT_DISPLAYNAME		"Miranda Text Control (Unicode)"
 +		#define MTEXT_FILENAME			"mtextcontrolW.dll"
 +	#else
 +		#define MTEXT_DISPLAYNAME		"Miranda Text Control (Ansi)"
 +		#define MTEXT_FILENAME			"mtextcontrol.dll"
 +	#endif
 +	#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://www.miranda-im.org/"
 +	#define MTEXT_UUID			{0x69b9443b, 0xdc58, 0x4876, { 0xad, 0x39, 0xe3, 0xf4, 0x18, 0xa1, 0x33, 0xc5 } }
 +								//{69B9443B-DC58-4876-AD39-E3F418A133C5}
  | 
