summaryrefslogtreecommitdiff
path: root/plugins/MagneticWindows
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2013-10-12 18:14:02 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2013-10-12 18:14:02 +0000
commit53566f8632f56ecbaf2f3f80059a801cb1648358 (patch)
tree4e34daae490cec9670ae4f58f6b4bc3fc45118cf /plugins/MagneticWindows
parent6773fe45457b8ef6e87efa0b5aecc0899877b247 (diff)
added 64 bit compilation
git-svn-id: http://svn.miranda-ng.org/main/trunk@6459 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MagneticWindows')
-rw-r--r--plugins/MagneticWindows/MagneticWindows_10.vcxproj98
-rw-r--r--plugins/MagneticWindows/src/MagneticWindows.cpp20
-rw-r--r--plugins/MagneticWindows/src/MagneticWindowsCore.cpp47
-rw-r--r--plugins/MagneticWindows/src/MagneticWindowsCore.h1
-rw-r--r--plugins/MagneticWindows/src/Options.cpp27
-rw-r--r--plugins/MagneticWindows/src/Options.h2
-rw-r--r--plugins/MagneticWindows/src/SnapToListService.cpp2
-rw-r--r--plugins/MagneticWindows/src/SnapToListService.h2
8 files changed, 134 insertions, 65 deletions
diff --git a/plugins/MagneticWindows/MagneticWindows_10.vcxproj b/plugins/MagneticWindows/MagneticWindows_10.vcxproj
index 6e91f33f2a..c0b03c9b68 100644
--- a/plugins/MagneticWindows/MagneticWindows_10.vcxproj
+++ b/plugins/MagneticWindows/MagneticWindows_10.vcxproj
@@ -5,15 +5,24 @@
<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>{7DC23E4E-2448-4811-AABD-F5D069F6E74A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>MagneticWindows</RootNamespace>
+ <ProjectName>MagneticWindows</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -21,21 +30,38 @@
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<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 Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<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 Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>false</LinkIncremental>
@@ -43,12 +69,24 @@
<IntDir>$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
+ <IntDir>$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary>true</IgnoreImportLibrary>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
<OutDir>$(SolutionDir)$(Configuration)\Plugins\</OutDir>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <IntDir>$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ <OutDir>$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
+ <IgnoreImportLibrary>true</IgnoreImportLibrary>
+ </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Create</PrecompiledHeader>
@@ -82,6 +120,39 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <StringPooling>false</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <FunctionLevelLinking>
+ </FunctionLevelLinking>
+ <DisableSpecificWarnings>
+ </DisableSpecificWarnings>
+ <PrecompiledHeaderFile>MagneticWindowsCore.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <BaseAddress>
+ </BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@@ -109,6 +180,33 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MAGNETICWINDOWS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeaderFile>MagneticWindowsCore.h</PrecompiledHeaderFile>
+ <AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src\MagneticWindows.cpp" />
<ClCompile Include="src\MagneticWindowsCore.cpp" />
diff --git a/plugins/MagneticWindows/src/MagneticWindows.cpp b/plugins/MagneticWindows/src/MagneticWindows.cpp
index 80501cc80e..80b05731c0 100644
--- a/plugins/MagneticWindows/src/MagneticWindows.cpp
+++ b/plugins/MagneticWindows/src/MagneticWindows.cpp
@@ -43,25 +43,22 @@ int hLangpack;
//For other Plugins to start snapping for other Windows
-int SnapPluginWindowStart(WPARAM wParam, LPARAM lParam) {
-
+INT_PTR SnapPluginWindowStart(WPARAM wParam, LPARAM) {
if (!WindowOpen((HWND)wParam)) return 1;
return 0;
}
//For other Plugins to stop snapping for other Windows
-int SnapPluginWindowStop(WPARAM wParam, LPARAM lParam) {
-
+INT_PTR SnapPluginWindowStop(WPARAM wParam, LPARAM) {
if (!WindowClose((HWND)wParam)) return 1;
return 0;
}
-int PluginMessageWindowEvent(WPARAM wParam, LPARAM lParam) {
- MessageWindowEventData* Data;
+int PluginMessageWindowEvent(WPARAM, LPARAM lParam) {
HWND hWndParent, hWnd;
- Data = (MessageWindowEventData*)(lParam);
+ MessageWindowEventData *Data = (MessageWindowEventData*) lParam;
switch (Data->uType) {
case MSG_WINDOW_EVT_OPEN:
@@ -93,8 +90,7 @@ int PluginMessageWindowEvent(WPARAM wParam, LPARAM lParam) {
///////////////////////////////////////////////////////////////////////////////////////////////////
-int SnapPluginStart(WPARAM wParam, LPARAM lParam) {
-
+int SnapPluginStart(WPARAM, LPARAM) {
LoadOptions();
hWindowEventHook = HookEvent(ME_MSG_WINDOWEVENT, PluginMessageWindowEvent);
@@ -103,7 +99,7 @@ int SnapPluginStart(WPARAM wParam, LPARAM lParam) {
return 0;
}
-int SnapPluginShootDown(WPARAM wParam, LPARAM lParam) {
+int SnapPluginShootDown(WPARAM, LPARAM) {
UnhookEvent(hWindowEventHook);
UnhookEvent(hLoadedHook);
UnhookEvent(hShootDownHook);
@@ -128,7 +124,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
return &pluginInfo;
}
-extern "C" int __declspec(dllexport) Load(void)
+extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfo);
@@ -143,7 +139,7 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
-extern "C" int __declspec(dllexport) Unload(void)
+extern "C" int __declspec(dllexport) Unload()
{
return 0;
}
diff --git a/plugins/MagneticWindows/src/MagneticWindowsCore.cpp b/plugins/MagneticWindows/src/MagneticWindowsCore.cpp
index 5af05dcd76..a3cd5f78d6 100644
--- a/plugins/MagneticWindows/src/MagneticWindowsCore.cpp
+++ b/plugins/MagneticWindows/src/MagneticWindowsCore.cpp
@@ -16,22 +16,18 @@ TWorkingVariables Globals = {
///////////////////////////////////////////////////////////////////////////////////////////////////
int Abs(int a) {
- if (a < 0) return (-a);
- return a;
+ return (a<0) ? -a : a;
}
PDockingWindow FindDockingWindow(HWND hWnd) {
- PDockingWindow i;
-
- i = Globals.WindowList;
+ PDockingWindow i = Globals.WindowList;
while (i != NULL) {
-
if (i->hWnd == hWnd) return i;
i = i->Next;
- };
+ }
return NULL;
}
@@ -39,24 +35,19 @@ PDockingWindow FindDockingWindow(HWND hWnd) {
void DockWindowRect(HWND hWnd, bool Sizing, RECT& GivenRect, int SizingEdge, int MouseX = 0, int MouseY = 0) {
POINT p;
- int diffX, diffY;
- RECT tmpRect, frmRect;
int W, H;
int XPos, YPos;
int tmpXPos, tmpYPos;
int tmpMouseX, tmpMouseY;
- bool FoundX, FoundY;
PRectList ActRect;
- diffX = Options.SnapWidth;
- diffY = Options.SnapWidth;
+ int diffX = Options.SnapWidth, diffY = Options.SnapWidth;
- tmpRect = GivenRect;
- frmRect = GivenRect;
+ RECT tmpRect = GivenRect;
+ RECT frmRect = GivenRect;
- FoundX = false;
- FoundY = false;
+ bool FoundX = false, FoundY = false;
if (!Sizing) {
GetCursorPos(&p);
@@ -290,8 +281,8 @@ void DockWindowRect(HWND hWnd, bool Sizing, RECT& GivenRect, int SizingEdge, int
void GetFrmRects(HWND ForWindow) {
-PDockingWindow i;
-PRectList Rect, l;
+ PDockingWindow i;
+ PRectList Rect, l;
Rect = Globals.Rects;
while (Rect != NULL) {
@@ -326,16 +317,12 @@ PRectList Rect, l;
///////////////////////////////////////////////////////////////////////////////////////////////////
LRESULT CALLBACK WindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
- PDockingWindow i;
-
RECT r;
POINT p;
- WNDPROC OldRun;
-
- i = FindDockingWindow(hWnd);
+ PDockingWindow i = FindDockingWindow(hWnd);
- OldRun = NULL;
+ WNDPROC OldRun = NULL;
if (i != NULL) { //else we have a problem
OldRun = i->OldWindowProc;
@@ -408,11 +395,11 @@ bool WindowOpen(HWND hWnd) {
Globals.WindowList = i;
if (IsWindowUnicode(hWnd)) {
- i->OldWindowProc = (WNDPROC) GetWindowLongW(hWnd, GWL_WNDPROC);
- SetWindowLongW(hWnd, GWL_WNDPROC, (LONG)(&WindowProc));
+ i->OldWindowProc = (WNDPROC) GetWindowLongPtrW(hWnd, GWLP_WNDPROC);
+ SetWindowLongPtrW(hWnd, GWLP_WNDPROC, (LONG_PTR)(&WindowProc));
} else {
- i->OldWindowProc = (WNDPROC) GetWindowLongA(hWnd, GWL_WNDPROC);
- SetWindowLongA(hWnd, GWL_WNDPROC, (LONG)(&WindowProc));
+ i->OldWindowProc = (WNDPROC) GetWindowLongPtrA(hWnd, GWLP_WNDPROC);
+ SetWindowLongPtrA(hWnd, GWLP_WNDPROC, (LONG_PTR)(&WindowProc));
}
return true;
@@ -439,9 +426,9 @@ bool WindowClose(HWND hWnd) {
}
if (IsWindowUnicode(hWnd)) {
- SetWindowLongW(hWnd, GWL_WNDPROC, (LONG) (i->OldWindowProc));
+ SetWindowLongPtrW(hWnd, GWLP_WNDPROC, (LONG_PTR) (i->OldWindowProc));
} else {
- SetWindowLongA(hWnd, GWL_WNDPROC, (LONG) (i->OldWindowProc));
+ SetWindowLongPtrA(hWnd, GWLP_WNDPROC, (LONG_PTR) (i->OldWindowProc));
}
mir_free(i);
diff --git a/plugins/MagneticWindows/src/MagneticWindowsCore.h b/plugins/MagneticWindows/src/MagneticWindowsCore.h
index c0d6938a7f..84ebf91100 100644
--- a/plugins/MagneticWindows/src/MagneticWindowsCore.h
+++ b/plugins/MagneticWindows/src/MagneticWindowsCore.h
@@ -8,7 +8,6 @@
#include <m_message.h>
#include <m_system.h>
#include <m_options.h>
-// #include "../include/m_plugins.h"
#include <m_database.h>
#include <m_langpack.h>
#include <m_MagneticWindows.h>
diff --git a/plugins/MagneticWindows/src/Options.cpp b/plugins/MagneticWindows/src/Options.cpp
index d070f40d56..8d986a26f5 100644
--- a/plugins/MagneticWindows/src/Options.cpp
+++ b/plugins/MagneticWindows/src/Options.cpp
@@ -8,10 +8,7 @@ TOptions Options = {
};
-int CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
-
- TCHAR str[64];
-
+INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
switch (msg) {
case WM_INITDIALOG: {
TranslateDialogDefault(hwndDlg);
@@ -20,7 +17,8 @@ int CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
SendDlgItemMessage(hwndDlg, IDC_SLIDER_SNAPWIDTH, TBM_SETRANGE, FALSE, MAKELONG(1,32));
SendDlgItemMessage(hwndDlg, IDC_SLIDER_SNAPWIDTH, TBM_SETPOS, TRUE, Options.SnapWidth);
- wsprintf(str, TranslateT("%d pix"), Options.SnapWidth);
+ TCHAR str[64];
+ mir_sntprintf(str, SIZEOF(str),TranslateT("%d pix"), Options.SnapWidth);
SetDlgItemText(hwndDlg, IDC_TXT_SNAPWIDTH, str);
EnableWindow(GetDlgItem(hwndDlg, IDC_SLIDER_SNAPWIDTH), Options.DoSnap);
@@ -30,8 +28,9 @@ int CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
break;
}
- case WM_HSCROLL: {
- mir_snwprintf(str, 64, TranslateT("%d pix"), SendDlgItemMessage(hwndDlg, IDC_SLIDER_SNAPWIDTH, TBM_GETPOS, 0, 0));
+ case WM_HSCROLL: {
+ TCHAR str[64];
+ mir_sntprintf(str, SIZEOF(str), TranslateT("%d pix"), SendDlgItemMessage(hwndDlg, IDC_SLIDER_SNAPWIDTH, TBM_GETPOS, 0, 0));
SetDlgItemText(hwndDlg, IDC_TXT_SNAPWIDTH, str);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -44,8 +43,6 @@ int CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
switch(idCtrl) {
case IDC_CHK_SNAP: {
if (wNotifyCode == BN_CLICKED) {
-
-
EnableWindow(GetDlgItem(hwndDlg, IDC_SLIDER_SNAPWIDTH), IsDlgButtonChecked(hwndDlg, IDC_CHK_SNAP));
EnableWindow(GetDlgItem(hwndDlg, IDC_TXT_SNAPWIDTH), IsDlgButtonChecked(hwndDlg, IDC_CHK_SNAP));
@@ -101,20 +98,12 @@ int InitOptions(WPARAM wParam, LPARAM) {
OPTIONSDIALOGPAGE Opt = { 0 };
Opt.cbSize = sizeof(Opt);
-// Opt.position = 0;
Opt.pfnDlgProc = OptionsDlgProc;
Opt.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MAGNETICWINDOWS);
Opt.hInstance = hInst;
-// Opt.hIcon = 0;
Opt.pszGroup = LPGEN("Customize");
Opt.pszTitle = LPGEN("Magnetic Windows");
-// Opt.groupPosition = 0;
-// Opt.hGroupIcon = 0;
Opt.flags = ODPF_BOLDGROUPS;
-// Opt.nIDBottomSimpleControl = 0;
-// Opt.nIDRightSimpleControl = 0;
-// Opt.expertOnlyControls = NULL;
-// Opt.nExpertOnlyControls = 0;
Options_AddPage(wParam, &Opt);
@@ -122,7 +111,7 @@ int InitOptions(WPARAM wParam, LPARAM) {
}
void LoadOptions() {
- Options.DoSnap = db_get_b(NULL, MODULE_NAME, "DoSnap", TRUE);
+ Options.DoSnap = db_get_b(NULL, MODULE_NAME, "DoSnap", 1) != 0;
Options.SnapWidth = db_get_b(NULL, MODULE_NAME, "SnapWidth", cDefaultSnapWidth);
- Options.ScriverWorkAround = db_get_b(NULL, MODULE_NAME, "ScriverWorkAround", FALSE);
+ Options.ScriverWorkAround = db_get_b(NULL, MODULE_NAME, "ScriverWorkAround", 0) != 0;
} \ No newline at end of file
diff --git a/plugins/MagneticWindows/src/Options.h b/plugins/MagneticWindows/src/Options.h
index ebb5458d4a..8eae719fcb 100644
--- a/plugins/MagneticWindows/src/Options.h
+++ b/plugins/MagneticWindows/src/Options.h
@@ -12,7 +12,7 @@ extern HANDLE hInitOptionsHook;
extern TOptions Options;
-int CALLBACK OptionsDlgProc(HWND, UINT, WPARAM, LPARAM);
+INT_PTR CALLBACK OptionsDlgProc(HWND, UINT, WPARAM, LPARAM);
int InitOptions(WPARAM, LPARAM);
void LoadOptions(); \ No newline at end of file
diff --git a/plugins/MagneticWindows/src/SnapToListService.cpp b/plugins/MagneticWindows/src/SnapToListService.cpp
index 5fc9f66268..df29a2cf70 100644
--- a/plugins/MagneticWindows/src/SnapToListService.cpp
+++ b/plugins/MagneticWindows/src/SnapToListService.cpp
@@ -4,7 +4,7 @@
HANDLE hSnapToListService;
-int SnapToList(WPARAM wParam, LPARAM Align) {
+INT_PTR SnapToList(WPARAM wParam, LPARAM Align) {
HWND hWnd, hWndList;
RECT WndRect, ListRect;
RECT AlignRect;
diff --git a/plugins/MagneticWindows/src/SnapToListService.h b/plugins/MagneticWindows/src/SnapToListService.h
index 27db7246cd..6e3b9a4077 100644
--- a/plugins/MagneticWindows/src/SnapToListService.h
+++ b/plugins/MagneticWindows/src/SnapToListService.h
@@ -2,4 +2,4 @@
extern HANDLE hSnapToListService;
-int SnapToList(WPARAM, LPARAM);
+INT_PTR SnapToList(WPARAM, LPARAM);