summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2012-05-08 09:56:10 +0000
committermataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2012-05-08 09:56:10 +0000
commitc91a1aaed9220ab9d4f93750a53ffb2efaf7c662 (patch)
tree50f97bc7bd36935655b096f01a498a6ac0b679a9
parent7b9d934638fb2dd8a09068bcfec390975c60f94e (diff)
added MsgPopup plugin
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@300 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
-rw-r--r--MsgPopup/Docs/MsgPopup.txt63
-rw-r--r--MsgPopup/MsgPopup.rc134
-rw-r--r--MsgPopup/MsgPopup.vcproj257
-rw-r--r--MsgPopup/MsgPopup.vcxproj151
-rw-r--r--MsgPopup/MsgPopup.vcxproj.filters44
-rw-r--r--MsgPopup/Resource.h34
-rw-r--r--MsgPopup/Src/Common.h51
-rw-r--r--MsgPopup/Src/Main.cpp291
-rw-r--r--MsgPopup/Src/Options.cpp137
-rw-r--r--MsgPopup/Version.h28
-rw-r--r--MsgPopup/Version.rc38
-rw-r--r--YAMN/resources/iconttbdown.icobin1150 -> 2038 bytes
12 files changed, 1228 insertions, 0 deletions
diff --git a/MsgPopup/Docs/MsgPopup.txt b/MsgPopup/Docs/MsgPopup.txt
new file mode 100644
index 0000000..5b99aed
--- /dev/null
+++ b/MsgPopup/Docs/MsgPopup.txt
@@ -0,0 +1,63 @@
+"MessageBox -> Popup" plugin
+==========================
+
+MsgBox.dll
+version 0.0.0.1
+by StDenis, ICQ#337380210
+
+Miranda 0.3.3+ recommended
+
+License info
+------------
+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.
+
+Description
+-----------
+
+I dunno how MessageBoxes act on you, but I'm tired of them.
+So I make a plugin which replace MessageBoxes with single OK button
+into popups.
+
+*** CAUTION! ***
+This plugin use non-ordinary technique - intercepting of API functions.
+Author made all his best to provide compatibility and stability, but as usual:
+
+THIS STUFF PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+Known bugs & limitations & ToDo's:
+----------------------------------
+ - There's no chance to test this plugin under consumer's version of Windows
+ (Win9x, WinME) carefully. It was tested on only one PC, which may didn't
+ reflect all specificity of these versions of OS.
+
+Thanx to:
+---------
+ I'm glad to say thanks to HeikoH. Who helps me to test this plugin and
+ provide compatibility with consumer's Windoze.
+
+Changelog
+---------
++ - Added,
+- - Fixed,
+* - Changed.
+
+Version 0.0.0.1
+---------------
+ + Initial release.
diff --git a/MsgPopup/MsgPopup.rc b/MsgPopup/MsgPopup.rc
new file mode 100644
index 0000000..e9e1ca9
--- /dev/null
+++ b/MsgPopup/MsgPopup.rc
@@ -0,0 +1,134 @@
+//Microsoft Developer Studio generated resource script.
+//
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "resource.h"
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Russian resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
+#ifdef _WIN32
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+#pragma code_page(1251)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_OPTIONS DIALOGEX 0, 0, 295, 181
+STYLE DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "",IDC_ASTERISK_FG,"ColourPicker",WS_GROUP | WS_TABSTOP,
+ 56,16,39,12,WS_EX_NOPARENTNOTIFY
+ GROUPBOX "ASTERISK style",IDC_STATIC,0,1,295,37
+ LTEXT "Background",IDC_STATIC,113,18,40,8
+ LTEXT "Foreground",IDC_STATIC,8,18,37,8
+ CONTROL "",IDC_ASTERISK_BG,"ColourPicker",WS_GROUP | WS_TABSTOP,
+ 161,16,39,12,WS_EX_NOPARENTNOTIFY
+ CONTROL "",IDC_ERROR_FG,"ColourPicker",WS_GROUP | WS_TABSTOP,56,
+ 56,39,12,WS_EX_NOPARENTNOTIFY
+ GROUPBOX "ERROR style",IDC_STATIC,0,41,295,37
+ LTEXT "Background",IDC_STATIC,113,58,40,8
+ LTEXT "Foreground",IDC_STATIC,8,58,37,8
+ CONTROL "",IDC_ERROR_BG,"ColourPicker",WS_GROUP | WS_TABSTOP,161,
+ 56,39,12,WS_EX_NOPARENTNOTIFY
+ CONTROL "",IDC_EXCLAMATION_FG,"ColourPicker",WS_GROUP |
+ WS_TABSTOP,56,96,39,12,WS_EX_NOPARENTNOTIFY
+ GROUPBOX "EXCLAMATION style",IDC_STATIC,0,81,295,37
+ LTEXT "Background",IDC_STATIC,113,98,40,8
+ LTEXT "Foreground",IDC_STATIC,8,98,37,8
+ CONTROL "",IDC_EXCLAMATION_BG,"ColourPicker",WS_GROUP |
+ WS_TABSTOP,161,96,39,12,WS_EX_NOPARENTNOTIFY
+ CONTROL "",IDC_QUESTION_FG,"ColourPicker",WS_GROUP | WS_TABSTOP,
+ 56,136,39,12,WS_EX_NOPARENTNOTIFY
+ GROUPBOX "QUESTION style",IDC_STATIC,0,121,295,37
+ LTEXT "Background",IDC_STATIC,113,138,40,8
+ LTEXT "Foreground",IDC_STATIC,8,138,37,8
+ CONTROL "",IDC_QUESTION_BG,"ColourPicker",WS_GROUP | WS_TABSTOP,
+ 161,136,39,12,WS_EX_NOPARENTNOTIFY
+ PUSHBUTTON "Preview",IDC_PREVIEW,234,162,50,14
+ LTEXT "Timeout",IDC_STATIC,213,18,26,8
+ EDITTEXT IDC_TIMEOUT1,245,15,40,14,ES_AUTOHSCROLL
+ LTEXT "Special values of the ""Timeout"":\n -1 - infinity, 0 - use default timeout value",
+ IDC_STATIC,17,160,137,18
+ LTEXT "Timeout",IDC_STATIC,213,58,26,8
+ EDITTEXT IDC_TIMEOUT2,245,55,40,14,ES_AUTOHSCROLL
+ LTEXT "Timeout",IDC_STATIC,213,98,26,8
+ EDITTEXT IDC_TIMEOUT3,245,95,40,14,ES_AUTOHSCROLL
+ LTEXT "Timeout",IDC_STATIC,213,138,26,8
+ EDITTEXT IDC_TIMEOUT4,245,135,40,14,ES_AUTOHSCROLL
+ CONTROL "Emit a sound",IDC_MESSAGEBEEP,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,167,164,57,10
+END
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resrc1.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""resource.h""\r\n"
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_OPTIONS, DIALOG
+ BEGIN
+ RIGHTMARGIN, 222
+ BOTTOMMARGIN, 179
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // Russian resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/MsgPopup/MsgPopup.vcproj b/MsgPopup/MsgPopup.vcproj
new file mode 100644
index 0000000..1eb492c
--- /dev/null
+++ b/MsgPopup/MsgPopup.vcproj
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="MsgPopup"
+ ProjectGUID="{705409E9-1F65-410B-9AA0-202055D008A8}"
+ RootNamespace="MsgPopup"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="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=".\Release/MsgPopup.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MsgPopup_EXPORTS;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=""
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ ProgramDatabaseFile=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/MsgPopup.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MsgPopup_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile=""
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ GenerateDebugInformation="true"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <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\Main.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Options.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\Src\Common.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="MsgPopup.rc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\Version.rc"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/MsgPopup/MsgPopup.vcxproj b/MsgPopup/MsgPopup.vcxproj
new file mode 100644
index 0000000..8d6232c
--- /dev/null
+++ b/MsgPopup/MsgPopup.vcxproj
@@ -0,0 +1,151 @@
+<?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|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{705409E9-1F65-410B-9AA0-202055D008A8}</ProjectGuid>
+ <RootNamespace>MsgPopup</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/MsgPopup.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MsgPopup_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <WarningLevel>Level3</WarningLevel>
+ <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ <Xdcmake />
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/MsgPopup.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MsgPopup_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ResourceCompile Include="MsgPopup.rc">
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <ResourceCompile Include="Version.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="Resource.h" />
+ <ClInclude Include="Src\Common.h" />
+ <ClInclude Include="Version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="Src\Main.cpp" />
+ <ClCompile Include="Src\Options.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/MsgPopup/MsgPopup.vcxproj.filters b/MsgPopup/MsgPopup.vcxproj.filters
new file mode 100644
index 0000000..f36afb5
--- /dev/null
+++ b/MsgPopup/MsgPopup.vcxproj.filters
@@ -0,0 +1,44 @@
+<?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>{fab2ba5a-a206-4ad5-ae81-b60f09004efe}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{fe895c7b-b460-49ab-ab98-40ccf1c01bfa}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{ab4311bd-5e9d-4569-8871-5effc311d2cd}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="MsgPopup.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="Version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="Src\Common.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="Src\Main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="Src\Options.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/MsgPopup/Resource.h b/MsgPopup/Resource.h
new file mode 100644
index 0000000..27e1287
--- /dev/null
+++ b/MsgPopup/Resource.h
@@ -0,0 +1,34 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by MsgBox.rc
+//
+#define IDD_OPTIONS 101
+
+#define IDC_ASTERISK_BG 101
+#define IDC_ERROR_FG 102
+#define IDC_ERROR_BG 103
+#define IDC_EXCLAMATION_FG 104
+#define IDC_EXCLAMATION_BG 105
+#define IDC_QUESTION_FG 106
+#define IDC_QUESTION_BG 107
+#define IDC_ASTERISK_FG 108
+#define IDC_PREVIEW 109
+
+#define IDC_TIMEOUT1 1000
+#define IDC_TIMEOUT2 1001
+#define IDC_TIMEOUT3 1002
+#define IDC_TIMEOUT4 1003
+
+#define IDC_MESSAGEBEEP 1004
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 135
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1004
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/MsgPopup/Src/Common.h b/MsgPopup/Src/Common.h
new file mode 100644
index 0000000..14a38f1
--- /dev/null
+++ b/MsgPopup/Src/Common.h
@@ -0,0 +1,51 @@
+/*
+
+MessagePopup - replacer of MessageBox'es
+
+Copyright 2004 Denis Stanishevskiy
+
+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 <windows.h>
+
+#include "newpluginapi.h"
+#include "m_system.h"
+#include "m_database.h"
+#include "m_langpack.h"
+#include "m_clist.h"
+#include "m_options.h"
+#include "m_utils.h"
+#include "m_popup.h"
+
+#include "..\Resource.h"
+#include "..\Version.h"
+
+#define SERVICENAME "MessagePopup"
+
+struct MSGBOXOPTIONS
+{
+ COLORREF FG[4];
+ COLORREF BG[4];
+ int Timeout[4];
+ BOOL Sound;
+};
+
+extern MSGBOXOPTIONS options;
+extern MSGBOXOPTIONS optionsDefault;
+
+extern BOOL CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
+
+void LoadConfig(); \ No newline at end of file
diff --git a/MsgPopup/Src/Main.cpp b/MsgPopup/Src/Main.cpp
new file mode 100644
index 0000000..930d330
--- /dev/null
+++ b/MsgPopup/Src/Main.cpp
@@ -0,0 +1,291 @@
+/*
+
+MessagePopup - replacer of MessageBox'es
+
+Copyright 2004 Denis Stanishevskiy
+
+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 "common.h"
+#include <tlhelp32.h>
+#include <dbghelp.h>
+#pragma comment(lib, "dbghelp.lib")
+
+HINSTANCE hInst = NULL;
+PLUGINLINK *pluginLink;
+
+HANDLE hHookedOpt;
+HANDLE hHookedInit;
+struct MM_INTERFACE mmi;
+
+MSGBOXOPTIONS optionsDefault =
+{
+ {0, 0xFFFFFF, 0, 0},
+ {0xBFFFFF, 0x0000FF, 0xB0B0FF, 0xECFF93},
+ {-1,-1,-1,-1},
+ TRUE
+};
+MSGBOXOPTIONS options;
+
+PLUGININFOEX pluginInfoEx={
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE,
+ 0,
+ // {B2177B76-2E4A-4322-874B-E15FD9E04004}
+ {0xb2177b76, 0x2e4a, 0x4322, {0x87, 0x4b, 0xe1, 0x5f, 0xd9, 0xe0, 0x40, 0x4}}
+};
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+ hInst=hinstDLL;
+ return TRUE;
+}
+
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ return &pluginInfoEx;
+}
+
+static const MUUID interfaces[] = {{0xb2177b76, 0x2e4a, 0x4322, {0x87, 0x4b, 0xe1, 0x5f, 0xd9, 0xe0, 0x40, 0x4}}, MIID_LAST};
+
+extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+{
+ return interfaces;
+}
+
+typedef int (WINAPI *MSGBOXPROC)(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);
+
+MSGBOXPROC prevMessageBoxA;
+
+#define OIC_HAND 32513
+#define OIC_QUES 32514
+#define OIC_BANG 32515
+#define OIC_NOTE 32516
+
+void popupMessage(LPCSTR lpText, LPCSTR lpCaption, UINT uType)
+{
+ POPUPDATAEX ppd;
+ int iIcon;
+ int indx;
+
+ ZeroMemory(&ppd, sizeof(ppd));
+
+ switch(uType & 0xF0)
+ {
+ case MB_ICONHAND:
+ indx = 1;
+ iIcon = OIC_HAND;
+ break;
+ case MB_ICONEXCLAMATION:
+ indx = 2;
+ iIcon = OIC_BANG;
+ break;
+ case MB_ICONQUESTION:
+ indx = 3;
+ iIcon = OIC_QUES;
+ break;
+ default:
+ indx = 0;
+ iIcon = OIC_NOTE;
+ break;
+
+ }
+ ppd.colorBack = options.BG[indx];
+ ppd.colorText = options.FG[indx];
+ ppd.iSeconds = options.Timeout[indx];
+
+ ppd.lchIcon = (HICON)LoadImage(NULL, MAKEINTRESOURCE(iIcon), IMAGE_ICON, SM_CXSMICON, SM_CYSMICON, LR_SHARED);
+ lstrcpy(ppd.lpzContactName, lpCaption);
+ lstrcpy(ppd.lpzText, lpText);
+ CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0);
+ if(options.Sound)
+ MessageBeep(uType);
+}
+
+int WINAPI newMessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType)
+{
+ if(CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0) == CALLSERVICE_NOTFOUND || (uType & 0x0F))
+ return prevMessageBoxA(hWnd, lpText, lpCaption, uType);
+
+ popupMessage(lpText, lpCaption,uType);
+ return IDOK;
+}
+
+BOOL g_HookError = FALSE;
+BOOL g_HookError2 = FALSE;
+int g_mod = 0;
+
+void HookOnImport(HMODULE hModule, char *lpszImpModName, DWORD lpOrigFunc, DWORD lpNewFunc)
+{
+ ULONG ulSize;
+ PIMAGE_IMPORT_DESCRIPTOR pImportDesc = (PIMAGE_IMPORT_DESCRIPTOR) ImageDirectoryEntryToData(
+ hModule,
+ TRUE,
+ IMAGE_DIRECTORY_ENTRY_IMPORT,
+ &ulSize);
+ if(pImportDesc == NULL) return;
+
+ for(; pImportDesc->Name; pImportDesc++)
+ {
+ char *pszModName = (char *)((PBYTE)hModule + pImportDesc->Name);
+
+ if (lstrcmpiA(lpszImpModName, pszModName) == 0)
+ {
+ PIMAGE_THUNK_DATA pThunk = (PIMAGE_THUNK_DATA)((PBYTE)hModule + pImportDesc->FirstThunk);
+
+ for (; pThunk->u1.Function; pThunk++)
+ {
+ DWORD* ppfn = (DWORD*) &pThunk->u1.Function;
+
+ if(*ppfn == lpOrigFunc)
+ {
+ DWORD oldProtect;
+
+ g_mod++;
+
+ if(!VirtualProtect((LPVOID)ppfn, 4, PAGE_EXECUTE_READWRITE, &oldProtect))
+ {
+ if(!g_HookError)
+ {
+ char buf[200];
+
+ g_HookError = TRUE;
+ wsprintf(buf, "VirtualProtect failed. Code %d\n"
+ "Try to call the author", GetLastError());
+ prevMessageBoxA(0, buf, "MsgBox", MB_OK);
+ }
+ }
+ *(DWORD*)ppfn = lpNewFunc;
+ if(*(DWORD*)ppfn != lpNewFunc)
+ {
+ if(!g_HookError2)
+ {
+ g_HookError2 = TRUE;
+ prevMessageBoxA(0, "Hmm. Something goes wrong. I can't write into the memory.\n"
+ "And as u can c, there are no any exception raised..\n"
+ "Try to call the author", "MsgBox", MB_OK);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void HookAPI()
+{
+ DWORD lpMessageBox = (DWORD)GetProcAddress(GetModuleHandle("USER32.DLL"), "MessageBoxA");
+ DWORD lpPopupMsgBox = (DWORD)newMessageBoxA;
+
+ prevMessageBoxA = (MSGBOXPROC)lpMessageBox;
+
+ BOOL bFound = FALSE;
+ HANDLE hModuleSnap = NULL;
+ MODULEENTRY32 me32 = {0};
+
+ hModuleSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId());
+ if(hModuleSnap == INVALID_HANDLE_VALUE)
+ return;
+
+ me32.dwSize = sizeof(MODULEENTRY32);
+ if(Module32First(hModuleSnap, &me32))
+ {
+ do
+ {
+ HookOnImport(me32.hModule, "USER32.DLL", lpMessageBox, lpPopupMsgBox);
+ }
+ while (!bFound && Module32Next(hModuleSnap, &me32));
+ }
+ CloseHandle (hModuleSnap);
+
+ return;
+}
+
+int HookedInit(WPARAM wParam, LPARAM lParam)
+{
+ HookAPI();
+
+ return 0;
+}
+
+int HookedOptions(WPARAM wParam, LPARAM lParam)
+{
+ OPTIONSDIALOGPAGE odp;
+
+ ZeroMemory(&odp, sizeof(odp));
+
+ odp.cbSize = sizeof(odp);
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_OPTIONS);
+ odp.pszTitle = "MessagePopup";
+ odp.pszGroup = "Popups";
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pfnDlgProc = OptionsDlgProc;
+ CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+
+ return 0;
+}
+
+void LoadConfig()
+{
+ char *szNameFG = "FGx";
+ char *szNameBG = "BGx";
+ char *szNameTO = "TOx";
+ int indx;
+
+ for(indx = 0; indx < 4; indx++)
+ {
+ char* FG = mir_strdup(szNameFG);
+ char* BG = mir_strdup(szNameBG);
+ char* TO = mir_strdup(szNameTO);
+ FG[2] = BG[2] = TO[2] = (char)(indx + '0');
+ options.FG[indx] = DBGetContactSettingDword(NULL, SERVICENAME, FG, optionsDefault.FG[indx]);
+ options.BG[indx] = DBGetContactSettingDword(NULL, SERVICENAME, BG, optionsDefault.BG[indx]);
+ options.Timeout[indx] = DBGetContactSettingDword(NULL, SERVICENAME, TO, (DWORD)optionsDefault.Timeout[indx]);
+ mir_free(FG);
+ mir_free(BG);
+ mir_free(TO);
+ }
+ options.Sound = DBGetContactSettingByte(NULL, SERVICENAME, "Sound", (DWORD)optionsDefault.Sound);
+
+}
+extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
+{
+ pluginLink=link;
+ mir_getMMI(&mmi);
+
+ hHookedInit = HookEvent(ME_SYSTEM_MODULESLOADED, HookedInit);
+ hHookedOpt = HookEvent(ME_OPT_INITIALISE, HookedOptions);
+
+ LoadConfig();
+
+ return 0;
+}
+
+extern "C" __declspec(dllexport) int Unload(void)
+{
+ UnhookEvent(hHookedOpt);
+ UnhookEvent(hHookedInit);
+
+ return 0;
+} \ No newline at end of file
diff --git a/MsgPopup/Src/Options.cpp b/MsgPopup/Src/Options.cpp
new file mode 100644
index 0000000..f99f5d9
--- /dev/null
+++ b/MsgPopup/Src/Options.cpp
@@ -0,0 +1,137 @@
+/*
+
+MessagePopup - replacer of MessageBox'es
+
+Copyright 2004 Denis Stanishevskiy
+
+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 "common.h"
+
+int idOptionControls[4][3] = {
+ IDC_ASTERISK_FG,IDC_ASTERISK_BG,IDC_TIMEOUT1,
+ IDC_ERROR_FG,IDC_ERROR_BG,IDC_TIMEOUT2,
+ IDC_EXCLAMATION_FG,IDC_EXCLAMATION_BG,IDC_TIMEOUT3,
+ IDC_QUESTION_FG,IDC_QUESTION_BG,IDC_TIMEOUT4
+};
+
+static int __inline DBWriteContactSettingDwordDef(HANDLE hContact,const char *szModule,const char *szSetting,DWORD val, DWORD defValue)
+{
+ if(val == DBGetContactSettingDword(hContact, szModule, szSetting, defValue))
+ return 0;
+ else
+ return DBWriteContactSettingDword(hContact, szModule, szSetting, val);
+}
+
+BOOL CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch (message)
+ {
+ case WM_INITDIALOG:
+ {
+ int indx;
+
+ TranslateDialogDefault(hWnd);
+ for(indx = 0; indx < 4; indx++)
+ {
+ SendDlgItemMessage(hWnd, idOptionControls[indx][0], CPM_SETCOLOUR, 0, options.FG[indx]);
+ SendDlgItemMessage(hWnd, idOptionControls[indx][1], CPM_SETCOLOUR, 0, options.BG[indx]);
+ SetDlgItemInt(hWnd, idOptionControls[indx][2], options.Timeout[indx], TRUE);
+ }
+ CheckDlgButton(hWnd, IDC_MESSAGEBEEP, options.Sound?BST_CHECKED:BST_UNCHECKED);
+ return TRUE;
+ }
+ case WM_COMMAND:
+ {
+ int indx, value;
+ BOOL Translated;
+ if(LOWORD(wParam) == IDC_PREVIEW)
+ {
+ MessageBoxA(0, Translate("Message with question"), Translate(SERVICENAME " - demo"), MB_ICONQUESTION);
+ MessageBoxA(0, Translate("Message with exclamation"), Translate(SERVICENAME " - demo"), MB_ICONEXCLAMATION);
+ MessageBoxA(0, Translate("Message with error"), Translate(SERVICENAME " - demo"), MB_ICONSTOP);
+ MessageBoxA(0, Translate("Message with asterisk"), Translate(SERVICENAME " - demo"), MB_ICONASTERISK);
+
+ return FALSE;
+ }
+ if(LOWORD(wParam) == IDC_MESSAGEBEEP)
+ {
+ options.Sound = IsDlgButtonChecked(hWnd, IDC_MESSAGEBEEP) == BST_CHECKED;
+ }
+ else
+ for(indx = 0; indx < 4; indx++)
+ {
+ if(LOWORD(wParam) == idOptionControls[indx][0])
+ {
+ if(HIWORD(wParam) != CPN_COLOURCHANGED) return FALSE;
+ options.FG[indx] = SendDlgItemMessage(hWnd, LOWORD(wParam), CPM_GETCOLOUR, 0, 0);
+ }
+ else
+ if(LOWORD(wParam) == idOptionControls[indx][1])
+ {
+ if(HIWORD(wParam) != CPN_COLOURCHANGED) return FALSE;
+ options.BG[indx] = SendDlgItemMessage(hWnd, LOWORD(wParam), CPM_GETCOLOUR, 0, 0);
+ }
+ else
+ if(LOWORD(wParam) == idOptionControls[indx][2])
+ {
+ if(HIWORD(wParam) != EN_CHANGE) return FALSE;
+ if((HWND)lParam != GetFocus()) return FALSE;
+
+ value = (DWORD)GetDlgItemInt(hWnd, LOWORD(wParam), &Translated, TRUE);
+ if(Translated) options.Timeout[indx] = value;
+ }
+ }
+ SendMessage(GetParent(hWnd), PSM_CHANGED, 0,0);
+ break;
+ }
+ case WM_NOTIFY:
+ switch (((LPNMHDR)lParam)->code)
+ {
+ case PSN_RESET:
+ LoadConfig();
+ return FALSE;
+
+ case PSN_APPLY:
+ {
+ char *szNameFG = "FGx";
+ char *szNameBG = "BGx";
+ char *szNameTO = "TOx";
+ int indx;
+
+ for(indx = 0; indx < 4; indx++)
+ {
+ char* FG = mir_strdup(szNameFG);
+ char* BG = mir_strdup(szNameBG);
+ char* TO = mir_strdup(szNameTO);
+ FG[2] = BG[2] = TO[2] = (char)(indx + '0');
+
+ DBWriteContactSettingDwordDef(NULL, SERVICENAME, FG, options.FG[indx], optionsDefault.FG[indx]);
+ DBWriteContactSettingDwordDef(NULL, SERVICENAME, BG, options.BG[indx], optionsDefault.BG[indx]);
+ DBWriteContactSettingDwordDef(NULL, SERVICENAME, TO, options.Timeout[indx], (DWORD)optionsDefault.Timeout[indx]);
+ mir_free(FG);
+ mir_free(BG);
+ mir_free(TO);
+ }
+ DBWriteContactSettingDwordDef(NULL,SERVICENAME,"Sound",options.Sound,optionsDefault.Sound);
+
+ break;
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/MsgPopup/Version.h b/MsgPopup/Version.h
new file mode 100644
index 0000000..3c645c1
--- /dev/null
+++ b/MsgPopup/Version.h
@@ -0,0 +1,28 @@
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 0
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 2
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
+
+#define __STRINGIFY_IMPL(x) #x
+#define __STRINGIFY(x) __STRINGIFY_IMPL(x)
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_DOTS)
+
+#ifdef _UNICODE
+#if defined(WIN64) || defined(_WIN64)
+ #define __PLUGIN_NAME "MessagePopup (Unicode x64)"
+#else
+ #define __PLUGIN_NAME "MessagePopup (Unicode)"
+#endif
+#else
+ #define __PLUGIN_NAME "MessagePopup"
+#endif
+#define __INTERNAL_NAME "MessagePopup"
+#define __FILENAME "MessagePopup.dll"
+#define __DESCRIPTION "This stuff will replace MessageBox'es [whose have only OK button] into Popups."
+#define __AUTHOR "Mataes, StDenis"
+#define __AUTHOREMAIL "mataes2007@gmail.com, stdenformiranda(at)fromru(dot)com"
+#define __AUTHORWEB "http://mataes.googlecode.com/svn/Miranda/Plugins/MessagePopup/"
+#define __COPYRIGHT "© 2010 Mataes, 2004 Denis Stanishevskiy"
diff --git a/MsgPopup/Version.rc b/MsgPopup/Version.rc
new file mode 100644
index 0000000..e637f0c
--- /dev/null
+++ b/MsgPopup/Version.rc
@@ -0,0 +1,38 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "afxres.h"
+#include "version.h"
+
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#endif //_WIN32
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "FileDescription", __DESCRIPTION
+ VALUE "InternalName", __PLUGIN_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "ProductName", __PLUGIN_NAME
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
diff --git a/YAMN/resources/iconttbdown.ico b/YAMN/resources/iconttbdown.ico
index 206eba2..81dd9fe 100644
--- a/YAMN/resources/iconttbdown.ico
+++ b/YAMN/resources/iconttbdown.ico
Binary files differ