diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-12-28 18:48:14 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-12-28 18:48:14 +0000 |
commit | 9598d99b370389cf445ed5164a1acbd6737599b3 (patch) | |
tree | 352ca8d584fec151f31df74ac6d367b92dea63e8 /plugins/StartPosition | |
parent | b86eac53e438cfc1ad0eea3b9eeaf368757970fa (diff) |
adopted StartPosition
git-svn-id: http://svn.miranda-ng.org/main/trunk@2872 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StartPosition')
-rw-r--r-- | plugins/StartPosition/StartPosition_11.vcxproj | 191 | ||||
-rw-r--r-- | plugins/StartPosition/StartPosition_11.vcxproj.filters | 38 | ||||
-rw-r--r-- | plugins/StartPosition/docs/ReadMe.txt | 10 | ||||
-rw-r--r-- | plugins/StartPosition/res/Version.rc | 38 | ||||
-rw-r--r-- | plugins/StartPosition/res/resource.rc | 103 | ||||
-rw-r--r-- | plugins/StartPosition/src/Version.h | 20 | ||||
-rw-r--r-- | plugins/StartPosition/src/main.cpp | 228 | ||||
-rw-r--r-- | plugins/StartPosition/src/resource.h | 30 |
8 files changed, 658 insertions, 0 deletions
diff --git a/plugins/StartPosition/StartPosition_11.vcxproj b/plugins/StartPosition/StartPosition_11.vcxproj new file mode 100644 index 0000000000..ca6e632498 --- /dev/null +++ b/plugins/StartPosition/StartPosition_11.vcxproj @@ -0,0 +1,191 @@ +<?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="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{046C5F80-ABE5-488F-BFC8-B024D4AACC8C}</ProjectGuid>
+ <ProjectName>StartPosition</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ <CharacterSet>Unicode</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" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|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)'=='Release|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|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.40219.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>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary>true</IgnoreImportLibrary>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <Optimization>Full</Optimization>
+ <WarningLevel>Level3</WarningLevel>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <LinkDLL>true</LinkDLL>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <AdditionalOptions>/PDBALTPATH:%_PDB% %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <Optimization>Full</Optimization>
+ <WarningLevel>Level3</WarningLevel>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <LinkDLL>true</LinkDLL>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <AdditionalOptions>/PDBALTPATH:%_PDB% %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <Optimization>Disabled</Optimization>
+ <WarningLevel>Level3</WarningLevel>
+ <MinimalRebuild>true</MinimalRebuild>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <LinkDLL>true</LinkDLL>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <Optimization>Disabled</Optimization>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <LinkDLL>true</LinkDLL>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\resource.rc" />
+ <ResourceCompile Include="res\Version.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\resource.h" />
+ <ClInclude Include="src\Version.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/StartPosition/StartPosition_11.vcxproj.filters b/plugins/StartPosition/StartPosition_11.vcxproj.filters new file mode 100644 index 0000000000..f94ffb1214 --- /dev/null +++ b/plugins/StartPosition/StartPosition_11.vcxproj.filters @@ -0,0 +1,38 @@ +<?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>{d083a117-c873-4360-9fb2-949bb52876fa}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{7eaa0c54-3e4d-43c7-ad4c-e25d03e01f5a}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{f7f3bc83-2d6e-4710-b6a2-8057f48e432e}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="res\Version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/StartPosition/docs/ReadMe.txt b/plugins/StartPosition/docs/ReadMe.txt new file mode 100644 index 0000000000..b4eb55ddab --- /dev/null +++ b/plugins/StartPosition/docs/ReadMe.txt @@ -0,0 +1,10 @@ +Window Start Position
+by souFrag / Felipe Brahm
+ICQ#50566818
+http://www.soufrag.cl
+
+Description:
+
+Makes the Contact List always start on the right or left side of the screen: "X" pixels away from the top, "K" pixels from the bottom and "R" pixels from the side of the Work Area of your main monitor.
+
+You may also select the width of the CList.
\ No newline at end of file diff --git a/plugins/StartPosition/res/Version.rc b/plugins/StartPosition/res/Version.rc new file mode 100644 index 0000000000..5bfbab4754 --- /dev/null +++ b/plugins/StartPosition/res/Version.rc @@ -0,0 +1,38 @@ +// Microsoft Visual C++ generated resource script.
+//
+#ifdef APSTUDIO_INVOKED
+#error this file is not editable by Microsoft Visual C++
+#endif //APSTUDIO_INVOKED
+
+#include "afxres.h"
+#include "..\src\version.h"
+
+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/plugins/StartPosition/res/resource.rc b/plugins/StartPosition/res/resource.rc new file mode 100644 index 0000000000..c54009e6ed --- /dev/null +++ b/plugins/StartPosition/res/resource.rc @@ -0,0 +1,103 @@ +//Microsoft Developer Studio generated resource script.
+//
+#include "..\src\resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "..\\src\\resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_OPTIONS DIALOGEX 0, 0, 312, 249
+STYLE DS_FIXEDSYS | DS_CENTER | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg"
+BEGIN
+ GROUPBOX "Contact List Window Start Position",IDC_STATIC,6,65,298,
+ 114,WS_TABSTOP
+ EDITTEXT IDC_CLTOP,117,89,26,12,ES_AUTOHSCROLL
+ CONTROL "Left",IDC_CLALIGN1,"Button",BS_AUTORADIOBUTTON |
+ WS_GROUP | WS_TABSTOP,151,118,58,10
+ CONTROL "Right",IDC_CLALIGN2,"Button",BS_AUTORADIOBUTTON |
+ WS_TABSTOP,216,118,71,10
+ EDITTEXT IDC_CLBOTTOM,117,103,26,12,ES_AUTOHSCROLL
+ EDITTEXT IDC_CLSIDE,117,116,26,12,ES_AUTOHSCROLL
+ EDITTEXT IDC_CLWIDTH,117,130,26,12,ES_AUTOHSCROLL
+ CONTROL "Pixels from Top",IDC_CLTOPENABLE,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,22,91,64,10
+ CONTROL "Pixels from Bottom",IDC_CLBOTTOMENABLE,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,22,105,73,10
+ CONTROL "Pixels from Side",IDC_CLSIDEENABLE,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,22,118,65,10
+ CONTROL "Width",IDC_CLWIDTHENABLE,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,22,131,35,10
+ CONTROL "Always start...",IDC_CLSTATEENABLE,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,22,144,59,10
+ CONTROL "Minimized to System Tray",IDC_CLSTATE0,"Button",
+ BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,117,145,180,
+ 10
+ CONTROL "Opened",IDC_CLSTATE2,"Button",BS_AUTORADIOBUTTON |
+ WS_TABSTOP,117,156,180,10
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_OPTIONS, DIALOG
+ BEGIN
+ LEFTMARGIN, 2
+ RIGHTMARGIN, 311
+ TOPMARGIN, 2
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
\ No newline at end of file diff --git a/plugins/StartPosition/src/Version.h b/plugins/StartPosition/src/Version.h new file mode 100644 index 0000000000..17b44ffa61 --- /dev/null +++ b/plugins/StartPosition/src/Version.h @@ -0,0 +1,20 @@ +#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 2
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 3
+
+#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)
+
+#define __PLUGIN_NAME "Window Start Position"
+#define __INTERNAL_NAME "StartPosition"
+#define __FILENAME "StartPosition.dll"
+#define __DESCRIPTION "Plugin supports starting position of Contact List relative to the the taskbar and screen side."
+#define __AUTHOR "Felipe Brahm - souFrag"
+#define __AUTHOREMAIL "felipebrahm@gmail.com"
+#define __AUTHORWEB "http://miranda-ng.org/"
+#define __COPYRIGHT "©2005-2008 Felipe Brahm - souFrag"
diff --git a/plugins/StartPosition/src/main.cpp b/plugins/StartPosition/src/main.cpp new file mode 100644 index 0000000000..934d92236f --- /dev/null +++ b/plugins/StartPosition/src/main.cpp @@ -0,0 +1,228 @@ +/*
+
+PLEASE CONTACT ME FIRST IF YOU WANT TO USE PART OF MY CODE IN YOUR OWN WORK :-)
+
+Felipe Brahm - souFrag
+ICQ#50566818
+http://www.soufrag.cl
+
+You cand send me an e-mail from my webpage :-)
+
+*/
+
+#include <windows.h>
+#include <stdio.h>
+
+#include <newpluginapi.h>
+#include <m_langpack.h>
+#include <m_database.h>
+#include <m_options.h>
+
+#include "resource.h"
+#include "version.h"
+
+#define dbERROR -999999
+#define RIGHT 1
+#define LEFT 0
+
+HINSTANCE hInst;
+int hLangpack;
+
+PLUGININFOEX pluginInfo = {
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE,
+ // {211F6277-6F9B-4b77-A939-84D04B26B38C}
+ {0x211f6277, 0x6f9b, 0x4b77, {0xa9, 0x39, 0x84, 0xd0, 0x4b, 0x26, 0xb3, 0x8c}}
+};
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+ hInst = hinstDLL;
+ return TRUE;
+}
+
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ return &pluginInfo;
+}
+
+static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (msg)
+ {
+ case WM_INITDIALOG:
+ {
+ TranslateDialogDefault(hwndDlg);
+
+ if(DBGetContactSettingByte(NULL,"WindowStartPosition","CLState",2))
+ CheckRadioButton(hwndDlg, IDC_CLSTATE0, IDC_CLSTATE2, IDC_CLSTATE2);
+ else
+ CheckRadioButton(hwndDlg, IDC_CLSTATE0, IDC_CLSTATE2, IDC_CLSTATE0);
+
+ if(DBGetContactSettingByte(NULL,"WindowStartPosition","CLAlign",1))
+ CheckRadioButton(hwndDlg, IDC_CLALIGN1, IDC_CLALIGN2, IDC_CLALIGN2);
+ else
+ CheckRadioButton(hwndDlg, IDC_CLALIGN1, IDC_CLALIGN2, IDC_CLALIGN1);
+
+ CheckDlgButton(hwndDlg, IDC_CLSTATEENABLE, DBGetContactSettingByte(NULL,"WindowStartPosition","CLEnableState",0) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_CLTOPENABLE, DBGetContactSettingByte(NULL,"WindowStartPosition","CLEnableTop",1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CLBOTTOMENABLE, DBGetContactSettingByte(NULL,"WindowStartPosition","CLEnableBottom",1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CLSIDEENABLE, DBGetContactSettingByte(NULL,"WindowStartPosition","CLEnableSide",1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CLWIDTHENABLE, DBGetContactSettingByte(NULL,"WindowStartPosition","CLEnableWidth",0) ? BST_CHECKED : BST_UNCHECKED);
+
+ SetDlgItemInt(hwndDlg,IDC_CLTOP,DBGetContactSettingDword(NULL,"WindowStartPosition","CLpixelsTop",3),TRUE);
+ SetDlgItemInt(hwndDlg,IDC_CLBOTTOM,DBGetContactSettingDword(NULL,"WindowStartPosition","CLpixelsBottom",3),TRUE);
+ SetDlgItemInt(hwndDlg,IDC_CLSIDE,DBGetContactSettingDword(NULL,"WindowStartPosition","CLpixelsSide",3),TRUE);
+ SetDlgItemInt(hwndDlg,IDC_CLWIDTH,DBGetContactSettingDword(NULL,"WindowStartPosition","CLWidth",180),FALSE);
+
+ return TRUE;
+ }
+ case WM_COMMAND:
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ case WM_NOTIFY:
+ switch (((LPNMHDR)lParam)->code)
+ {
+ case PSN_APPLY:
+ {
+
+ /*begin uninstall old settings*/
+ if(DBGetContactSettingByte(NULL, "WindowStartPosition", "CLEnableTop", dbERROR) == dbERROR) {
+
+ DBDeleteContactSetting(NULL,"WindowStartPosition","CLEnable");
+ DBDeleteContactSetting(NULL,"WindowStartPosition","CLuseLastWidth");
+ }
+ /*end uninstall old settings*/
+
+ if(IsDlgButtonChecked(hwndDlg, IDC_CLSTATE2))
+ DBWriteContactSettingByte(NULL,"WindowStartPosition","CLState",2);
+ else
+ DBWriteContactSettingByte(NULL,"WindowStartPosition","CLState",0);
+
+ if(IsDlgButtonChecked(hwndDlg, IDC_CLALIGN1))
+ DBWriteContactSettingByte(NULL,"WindowStartPosition","CLAlign",0);
+ else
+ DBWriteContactSettingByte(NULL,"WindowStartPosition","CLAlign",1);
+
+ DBWriteContactSettingByte(NULL,"WindowStartPosition","CLEnableState",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_CLSTATEENABLE));
+
+ DBWriteContactSettingByte(NULL,"WindowStartPosition","CLEnableTop",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_CLTOPENABLE));
+ DBWriteContactSettingByte(NULL,"WindowStartPosition","CLEnableBottom",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_CLBOTTOMENABLE));
+ DBWriteContactSettingByte(NULL,"WindowStartPosition","CLEnableSide",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_CLSIDEENABLE));
+ DBWriteContactSettingByte(NULL,"WindowStartPosition","CLEnableWidth",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_CLWIDTHENABLE));
+ DBWriteContactSettingDword(NULL,"WindowStartPosition","CLWidth",GetDlgItemInt(hwndDlg,IDC_CLWIDTH,NULL,FALSE));
+ DBWriteContactSettingDword(NULL,"WindowStartPosition","CLpixelsTop",GetDlgItemInt(hwndDlg,IDC_CLTOP,NULL,TRUE));
+ DBWriteContactSettingDword(NULL,"WindowStartPosition","CLpixelsBottom",GetDlgItemInt(hwndDlg,IDC_CLBOTTOM,NULL,TRUE));
+ DBWriteContactSettingDword(NULL,"WindowStartPosition","CLpixelsSide",GetDlgItemInt(hwndDlg,IDC_CLSIDE,NULL,TRUE));
+
+ return TRUE;
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
+
+int OptInit(WPARAM wParam, LPARAM lParam)
+{
+ OPTIONSDIALOGPAGE odp = {0};
+ odp.cbSize = sizeof(odp);
+ odp.position = 0;
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.pszGroup = LPGEN("Contact List");
+ odp.pszTitle = LPGEN("Window Start Position");
+ odp.pfnDlgProc = OptionsDlgProc;
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wParam, &odp);
+
+ return 0;
+}
+
+extern "C" __declspec(dllexport) int Load(void)
+{
+ mir_getLP(&pluginInfo);
+
+ RECT WorkArea;
+
+ int clWidth=0;
+ int clTop, clBottom, clSide; //pixels from top, bottom, side
+ int clAlign;
+ int clEnableTop, clEnableBottom, clEnableSide, clEnableWidth, clEnableState;
+ int clState;
+
+ HookEvent(ME_OPT_INITIALISE,OptInit);
+
+ SystemParametersInfo(SPI_GETWORKAREA, 0, &WorkArea, 0);
+
+ clEnableTop = DBGetContactSettingByte(NULL, "WindowStartPosition", "CLEnableTop", 1);
+ clEnableBottom = DBGetContactSettingByte(NULL, "WindowStartPosition", "CLEnableBottom", 1);
+ clEnableSide = DBGetContactSettingByte(NULL, "WindowStartPosition", "CLEnableSide", 1);
+ clEnableWidth = DBGetContactSettingByte(NULL, "WindowStartPosition", "CLEnableWidth", 0);
+
+ clTop = DBGetContactSettingDword(NULL, "WindowStartPosition", "CLpixelsTop", 3);
+ clBottom = DBGetContactSettingDword(NULL, "WindowStartPosition", "CLpixelsBottom", 3);
+ clSide = DBGetContactSettingDword(NULL, "WindowStartPosition", "CLpixelsSide", 3);
+ clAlign = DBGetContactSettingByte(NULL, "WindowStartPosition", "CLAlign", RIGHT);
+ clWidth = DBGetContactSettingDword(NULL, "WindowStartPosition", "CLWidth", 180);
+
+ clEnableState = DBGetContactSettingByte(NULL, "WindowStartPosition", "CLEnableState", 0);
+ clState = DBGetContactSettingByte(NULL, "WindowStartPosition", "CLState", 2);
+
+ if(clEnableState)
+ DBWriteContactSettingByte(NULL,"CList", "State", (BYTE)clState);
+
+ if(clEnableWidth) {
+
+ if(clWidth > 0)
+ DBWriteContactSettingDword(NULL, "CList", "Width", clWidth);
+
+ } else {
+
+ clWidth = DBGetContactSettingDword(NULL, "CList", "Width", 180);
+
+ }
+
+ if(clEnableTop || clEnableBottom || clEnableSide)
+ DBWriteContactSettingByte(NULL,"CList", "Docked", 0);
+
+ if(clEnableTop)
+ DBWriteContactSettingDword(NULL, "CList", "y", clTop);
+
+ //thx ValeraVi
+ if(clEnableBottom) {
+
+ if(clEnableTop)
+
+ DBWriteContactSettingDword(NULL, "CList", "Height", (WorkArea.bottom - WorkArea.top - clTop - clBottom));
+
+ else
+
+ DBWriteContactSettingDword(NULL, "CList", "y", (WorkArea.bottom - clBottom - (int)DBGetContactSettingDword(NULL, "CList", "Height", 0)));
+
+ }
+
+ if(clEnableSide) {
+
+ if(clAlign == LEFT)
+ DBWriteContactSettingDword(NULL, "CList", "x", (WorkArea.left + clSide));
+ else
+ DBWriteContactSettingDword(NULL, "CList", "x", (WorkArea.right - clWidth - clSide));
+
+ }
+
+ return 0;
+}
+
+extern "C" __declspec(dllexport) int Unload(void)
+{
+ return 0;
+}
\ No newline at end of file diff --git a/plugins/StartPosition/src/resource.h b/plugins/StartPosition/src/resource.h new file mode 100644 index 0000000000..0b9dea9479 --- /dev/null +++ b/plugins/StartPosition/src/resource.h @@ -0,0 +1,30 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by resource.rc
+//
+#define IDD_OPTIONS 101
+#define IDC_CLTOP 1001
+#define IDC_CLBOTTOM 1002
+#define IDC_CLSIDE 1003
+#define IDC_CLWIDTH 1004
+#define IDC_CLALIGN1 1005
+#define IDC_CLALIGN2 1006
+#define IDC_CLTOPENABLE 1007
+#define IDC_CLSTATE0 1008
+#define IDC_CLBOTTOMENABLE 1009
+#define IDC_CLSIDEENABLE 1010
+#define IDC_CLWIDTHENABLE 1011
+#define IDC_CLSTATEENABLE 1012
+#define IDC_CLSTATE2 1013
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40018
+#define _APS_NEXT_CONTROL_VALUE 1014
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
|