diff options
-rw-r--r-- | worldtime_protocol/WorldTime.rc | 2 | ||||
-rw-r--r-- | worldtime_protocol/common.h | 34 | ||||
-rw-r--r-- | worldtime_protocol/options.cpp | 4 | ||||
-rw-r--r-- | worldtime_protocol/options.h | 2 | ||||
-rw-r--r-- | worldtime_protocol/resource.h | 1 | ||||
-rw-r--r-- | worldtime_protocol/time_display.cpp | 10 | ||||
-rw-r--r-- | worldtime_protocol/worldtimeproto.cpp | 16 | ||||
-rw-r--r-- | worldtime_protocol/worldtimeproto.plg | 25 | ||||
-rw-r--r-- | worldtime_protocol/worldtimeproto.sln | 12 | ||||
-rw-r--r-- | worldtime_protocol/worldtimeproto.vcproj | 46 |
10 files changed, 66 insertions, 86 deletions
diff --git a/worldtime_protocol/WorldTime.rc b/worldtime_protocol/WorldTime.rc index 49d5e90..b66c8b6 100644 --- a/worldtime_protocol/WorldTime.rc +++ b/worldtime_protocol/WorldTime.rc @@ -7,7 +7,7 @@ //
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
+#include <windows.h>
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
diff --git a/worldtime_protocol/common.h b/worldtime_protocol/common.h index f1a2b3d..926cf50 100644 --- a/worldtime_protocol/common.h +++ b/worldtime_protocol/common.h @@ -16,23 +16,23 @@ #include <stdio.h>
-#include "../../include/newpluginapi.h"
-#include "../../include/statusmodes.h"
-#include "../../include/m_options.h"
-#include "../../include/m_langpack.h"
-#include "../../include/m_popup.h"
-#include "../../include/m_system.h"
-#include "../../include/m_skin.h"
-#include "../../include/m_netlib.h"
-#include "../../include/m_database.h"
-#include "../../include/m_protocols.h"
-#include "../../include/m_protomod.h"
-#include "../../include/m_protosvc.h"
-#include "../../include/m_ignore.h"
-#include "../../include/m_clist.h"
-#include "../../include/m_clui.h"
-#include "../../include/m_utils.h"
-#include "../../include/m_updater.h"
+#include "../../../include/newpluginapi.h"
+#include "../../../include/statusmodes.h"
+#include "../../../include/m_options.h"
+#include "../../../include/m_langpack.h"
+#include "../../../include/m_popup.h"
+#include "../../../include/m_system.h"
+#include "../../../include/m_skin.h"
+#include "../../../include/m_netlib.h"
+#include "../../../include/m_database.h"
+#include "../../../include/m_protocols.h"
+#include "../../../include/m_protomod.h"
+#include "../../../include/m_protosvc.h"
+#include "../../../include/m_ignore.h"
+#include "../../../include/m_clist.h"
+#include "../../../include/m_clui.h"
+#include "../../../include/m_utils.h"
+#include "m_updater.h"
extern HINSTANCE hInst;
diff --git a/worldtime_protocol/options.cpp b/worldtime_protocol/options.cpp index 9e2c750..7b04e34 100644 --- a/worldtime_protocol/options.cpp +++ b/worldtime_protocol/options.cpp @@ -28,7 +28,7 @@ void fill_timezone_list_control(HWND hwndDlg) { LISTITEM add_edit_item;
-BOOL CALLBACK DlgProcOptsEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+INT_PTR CALLBACK DlgProcOptsEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
HWND hw;
int sel;
char buf[MAX_NAME_LENGTH];
@@ -115,7 +115,7 @@ BOOL CALLBACK DlgProcOptsEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar return FALSE;
}
-static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
HWND hw;
int sel, index;
diff --git a/worldtime_protocol/options.h b/worldtime_protocol/options.h index 501582f..8f65517 100644 --- a/worldtime_protocol/options.h +++ b/worldtime_protocol/options.h @@ -10,7 +10,7 @@ extern bool set_format, hide_proto; extern TCHAR format_string[512], date_format_string[512], clist_format_string[512];
extern LISTITEM add_edit_item;
-BOOL CALLBACK DlgProcOptsEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK DlgProcOptsEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int OptInit(WPARAM wParam,LPARAM lParam);
void LoadOptions();
diff --git a/worldtime_protocol/resource.h b/worldtime_protocol/resource.h index 90294d3..bcc7520 100644 --- a/worldtime_protocol/resource.h +++ b/worldtime_protocol/resource.h @@ -2,6 +2,7 @@ // Microsoft Developer Studio generated include file.
// Used by WorldTime.rc
//
+#define IDC_STATIC -1
#define IDD_DIALOG1 101
#define IDI_ICON_SUN 104
#define IDI_ICON_MOON 105
diff --git a/worldtime_protocol/time_display.cpp b/worldtime_protocol/time_display.cpp index 2489c19..348085e 100644 --- a/worldtime_protocol/time_display.cpp +++ b/worldtime_protocol/time_display.cpp @@ -49,7 +49,7 @@ typedef struct WindowData_tag { TIME_ZONE_INFORMATION tzi;
} WindowData;
-BOOL CALLBACK DlgProcDisplay(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+INT_PTR CALLBACK DlgProcDisplay(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
RECT r;
HDC hdc;
PAINTSTRUCT ps;
@@ -72,7 +72,7 @@ BOOL CALLBACK DlgProcDisplay(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara GetClientRect(hwndDlg, &r);
FillRect(hdc, &r, GetSysColorBrush(COLOR_WINDOW));
- WindowData *wd = (WindowData *)GetWindowLong(hwndDlg, GWL_USERDATA);
+ WindowData *wd = (WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if(wd) {
RECT br = r, lr = r;
br.bottom -= (r.bottom - r.top) / 4;
@@ -95,7 +95,7 @@ BOOL CALLBACK DlgProcDisplay(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara case WM_UPDATE_DATA:
{
SYSTEMTIME st, other_st;
- WindowData *wd = (WindowData *)GetWindowLong(hwndDlg, GWL_USERDATA);
+ WindowData *wd = (WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
MyGetSystemTime(&st);
MySystemTimeToTzSpecificLocalTime(&wd->tzi, &st, &other_st);
@@ -122,7 +122,7 @@ BOOL CALLBACK DlgProcDisplay(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara case WM_DESTROY:
{
KillTimer(hwndDlg, ID_UPDATE_TIMER);
- WindowData *wd = (WindowData *)GetWindowLong(hwndDlg, GWL_USERDATA);
+ WindowData *wd = (WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
HANDLE hContact = wd->hContact;
if(CallService(MS_DB_CONTACT_IS, (WPARAM)hContact, 0))
Utils_SaveWindowPosition(hwndDlg, hContact, PROTO, "timewnd");
@@ -166,7 +166,7 @@ int show_time(HANDLE hContact) { }
DBWriteContactSettingDword(hContact, PROTO, "WindowHandle", (DWORD)hwnd);
- SetWindowLong(hwnd, GWL_USERDATA, (LONG)wd);
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)wd);
SendMessage(hwnd, WM_UPDATE_DATA, 0, 0);
if(CallService(MS_DB_CONTACT_IS, (WPARAM)hContact, 0))
diff --git a/worldtime_protocol/worldtimeproto.cpp b/worldtime_protocol/worldtimeproto.cpp index f782c0c..6a1cad4 100644 --- a/worldtime_protocol/worldtimeproto.cpp +++ b/worldtime_protocol/worldtimeproto.cpp @@ -13,7 +13,7 @@ int previousMode, UINT id_timer = 0;
// protocol related services
-int GetCaps(WPARAM wParam,LPARAM lParam)
+INT_PTR GetCaps(WPARAM wParam,LPARAM lParam)
{
int ret = 0;
switch (wParam) {
@@ -46,7 +46,7 @@ int GetCaps(WPARAM wParam,LPARAM lParam) * @param wParam : max size of the name
* @param lParam : reference to a char *, which will hold the name
*/
-int GetName(WPARAM wParam,LPARAM lParam)
+INT_PTR GetName(WPARAM wParam,LPARAM lParam)
{
char *name = (char *)Translate(PROTO);
size_t size = min(strlen(name),wParam-1); // copy only the first size bytes.
@@ -62,7 +62,7 @@ int GetName(WPARAM wParam,LPARAM lParam) <tt>PLI_PROTOCOL | PLI_ONLINE | PLI_OFFLINE</tt>
* @return an \c HICON in which the icon has been loaded.
*/
-int LoadIcon(WPARAM wParam,LPARAM lParam)
+INT_PTR LoadIcon(WPARAM wParam,LPARAM lParam)
{
UINT id;
@@ -81,7 +81,7 @@ int LoadIcon(WPARAM wParam,LPARAM lParam) return (int) (HICON) NULL;
}
- return (int) LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON,
+ return (INT_PTR) LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON,
GetSystemMetrics(wParam & PLIF_SMALL ? SM_CXSMICON : SM_CXICON),
GetSystemMetrics(wParam & PLIF_SMALL ? SM_CYSMICON : SM_CYICON), 0);
return 0;
@@ -92,7 +92,7 @@ int LoadIcon(WPARAM wParam,LPARAM lParam) * @param wParam : The new mode
* @param lParam : Allways set to 0.
*/
-int SetStatus(WPARAM wParam,LPARAM lParam)
+INT_PTR SetStatus(WPARAM wParam,LPARAM lParam)
{
previousMode = mcStatus;
mcStatus = (int)wParam;
@@ -103,7 +103,7 @@ int SetStatus(WPARAM wParam,LPARAM lParam) /** Returns the current status
*/
-int GetStatus(WPARAM wParam,LPARAM lParam)
+INT_PTR GetStatus(WPARAM wParam,LPARAM lParam)
{
return mcStatus;
}
@@ -176,7 +176,7 @@ static DWORD CALLBACK sttFakeAckInfoSuccess( LPVOID param ) return 0;
}
-int GetInfo(WPARAM wParam, LPARAM lParam) {
+INT_PTR GetInfo(WPARAM wParam, LPARAM lParam) {
CCSDATA *ccs = (CCSDATA *) lParam;
DWORD dwThreadId;
HANDLE hEvent;
@@ -194,7 +194,7 @@ int GetInfo(WPARAM wParam, LPARAM lParam) { return 0;
}
-int EditContact(WPARAM wParam, LPARAM lParam) {
+INT_PTR EditContact(WPARAM wParam, LPARAM lParam) {
LISTITEM pa;
HWND hwndList = (HWND)CallService(MS_CLUI_GETHWND, 0, 0);
DBVARIANT dbv;
diff --git a/worldtime_protocol/worldtimeproto.plg b/worldtime_protocol/worldtimeproto.plg deleted file mode 100644 index e545d4e..0000000 --- a/worldtime_protocol/worldtimeproto.plg +++ /dev/null @@ -1,25 +0,0 @@ -<html>
-<body>
-<pre>
-<h1>Build Log</h1>
-<h3>
---------------------Configuration: worldtimeproto - Win32 Release--------------------
-</h3>
-<h3>Command Lines</h3>
-
-
-
-<h3>Results</h3>
-worldtimeproto.dll - 0 error(s), 0 warning(s)
-<h3>
---------------------Configuration: worldtimeproto - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-
-
-
-<h3>Results</h3>
-worldtimeproto.dll - 0 error(s), 0 warning(s)
-</pre>
-</body>
-</html>
diff --git a/worldtime_protocol/worldtimeproto.sln b/worldtime_protocol/worldtimeproto.sln index 0e21399..eed0b2e 100644 --- a/worldtime_protocol/worldtimeproto.sln +++ b/worldtime_protocol/worldtimeproto.sln @@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "worldtimeproto", "worldtimeproto.vcproj", "{B88D386A-6914-4827-945C-11193421C0FF}"
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "worldtimeproto", "worldtimeproto.vcproj", "{4B6700F8-ACFC-4B21-A04A-74631C26AED0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B88D386A-6914-4827-945C-11193421C0FF}.Debug|Win32.ActiveCfg = Debug|Win32
- {B88D386A-6914-4827-945C-11193421C0FF}.Debug|Win32.Build.0 = Debug|Win32
- {B88D386A-6914-4827-945C-11193421C0FF}.Release|Win32.ActiveCfg = Release|Win32
- {B88D386A-6914-4827-945C-11193421C0FF}.Release|Win32.Build.0 = Release|Win32
+ {4B6700F8-ACFC-4B21-A04A-74631C26AED0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4B6700F8-ACFC-4B21-A04A-74631C26AED0}.Debug|Win32.Build.0 = Debug|Win32
+ {4B6700F8-ACFC-4B21-A04A-74631C26AED0}.Release|Win32.ActiveCfg = Release|Win32
+ {4B6700F8-ACFC-4B21-A04A-74631C26AED0}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/worldtime_protocol/worldtimeproto.vcproj b/worldtime_protocol/worldtimeproto.vcproj index d9cb03e..dfacf8a 100644 --- a/worldtime_protocol/worldtimeproto.vcproj +++ b/worldtime_protocol/worldtimeproto.vcproj @@ -3,8 +3,7 @@ ProjectType="Visual C++"
Version="8.00"
Name="worldtimeproto"
- ProjectGUID="{B88D386A-6914-4827-945C-11193421C0FF}"
- RootNamespace="worldtimeproto"
+ ProjectGUID="{4B6700F8-ACFC-4B21-A04A-74631C26AED0}"
Keyword="MFCProj"
>
<Platforms>
@@ -49,19 +48,18 @@ <Tool
Name="VCCLCompilerTool"
Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WORLDTIMEPROTO_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="common.h"
+ PrecompiledHeaderFile=".\Debug/worldtimeproto.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -122,7 +120,6 @@ UseOfMFC="2"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
- WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -147,23 +144,20 @@ />
<Tool
Name="VCCLCompilerTool"
- Optimization="3"
+ Optimization="1"
InlineFunctionExpansion="1"
- FavorSizeOrSpeed="2"
- OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WORLDTIMEPROTO_EXPORTS"
StringPooling="true"
- ExceptionHandling="1"
- RuntimeLibrary="0"
+ RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="common.h"
+ PrecompiledHeaderFile=".\Release/worldtimeproto.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
+ BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="true"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -179,15 +173,12 @@ <Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
+ AdditionalOptions="/filealign:512"
AdditionalDependencies="wsock32.lib user32.lib gdi32.lib ws2_32.lib shell32.lib comdlg32.lib Advapi32.lib"
OutputFile="../../bin/release/plugins/worldtimeproto.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
- GenerateManifest="false"
- GenerateDebugInformation="true"
ProgramDatabaseFile=".\Release/worldtimeproto.pdb"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
BaseAddress="0x22080000"
ImportLibrary=".\Release/worldtimeproto.lib"
TargetMachine="1"
@@ -197,7 +188,6 @@ />
<Tool
Name="VCManifestTool"
- EmbedManifest="false"
/>
<Tool
Name="VCXDCMakeTool"
@@ -236,6 +226,7 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
@@ -244,6 +235,7 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
@@ -260,6 +252,7 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
@@ -268,6 +261,7 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
@@ -280,6 +274,7 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
@@ -288,6 +283,7 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
@@ -300,6 +296,7 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
@@ -308,6 +305,7 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
@@ -320,6 +318,7 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
@@ -328,6 +327,7 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
@@ -340,8 +340,8 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
- UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
@@ -349,8 +349,8 @@ >
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
- UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
@@ -397,6 +397,10 @@ >
</File>
<File
+ RelativePath="StdAfx.h"
+ >
+ </File>
+ <File
RelativePath="time_convert.h"
>
</File>
|