From fb4c6ea798339e299609b4caffe5616ca9c3caf0 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 5 Mar 2013 20:29:07 +0000 Subject: added precompiled header added version info git-svn-id: http://svn.miranda-ng.org/main/trunk@3901 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/QuickContacts/quickcontacts_10.vcxproj | 139 ++++++--------------- plugins/QuickContacts/quickcontacts_11.vcxproj | 127 +++++-------------- .../QuickContacts/quickcontacts_11.vcxproj.filters | 29 ++--- plugins/QuickContacts/res/Version.rc | 38 ++++++ plugins/QuickContacts/res/resource.rc | 33 ++--- plugins/QuickContacts/src/Version.h | 14 +++ plugins/QuickContacts/src/commons.h | 34 ++--- plugins/QuickContacts/src/options.cpp | 7 +- plugins/QuickContacts/src/options.h | 6 - plugins/QuickContacts/src/quickcontacts.cpp | 38 +++--- plugins/QuickContacts/src/stdafx.cpp | 18 +++ 11 files changed, 189 insertions(+), 294 deletions(-) create mode 100644 plugins/QuickContacts/res/Version.rc create mode 100644 plugins/QuickContacts/src/Version.h create mode 100644 plugins/QuickContacts/src/stdafx.cpp (limited to 'plugins/QuickContacts') diff --git a/plugins/QuickContacts/quickcontacts_10.vcxproj b/plugins/QuickContacts/quickcontacts_10.vcxproj index a49e3915e0..22c7be8d08 100644 --- a/plugins/QuickContacts/quickcontacts_10.vcxproj +++ b/plugins/QuickContacts/quickcontacts_10.vcxproj @@ -20,58 +20,49 @@ {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10} - quickcontacts QuickContacts DynamicLibrary - false Unicode + v110_xp DynamicLibrary - false Unicode + v110_xp DynamicLibrary - false Unicode true + v110_xp DynamicLibrary - false Unicode true + v110_xp - - - - <_ProjectFileVersion>10.0.40219.1 - false - false - true - true $(SolutionDir)$(Configuration)64\Plugins\ $(SolutionDir)$(Configuration)64\Plugins\ $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ @@ -80,195 +71,147 @@ $(SolutionDir)$(Configuration)\Plugins\ $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + true - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/quickcontacts.tlb - - - Full OnlyExplicitInline ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true - MultiThreadedDLL true - All Level3 - true - ProgramDatabase Size false + Use + commons.h NDEBUG;%(PreprocessorDefinitions) - 0x0409 ..\..\include\msapi - /ignore:4108 /PDBALTPATH:%_PDB% %(AdditionalOptions) - comctl32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - true + /PDBALTPATH:%_PDB% %(AdditionalOptions) + comctl32.lib;%(AdditionalDependencies) true 0x32100000 - MachineX86 - $(ProfileDir)..\..\bin10\lib + $(ProfileDir)..\..\bin11\lib true true $(IntDir)$(TargetName).lib mir_core.dll + Windows + false - - - NDEBUG;%(PreprocessorDefinitions) - true - true - .\Release/quickcontacts.tlb - - - Full OnlyExplicitInline ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true - MultiThreadedDLL true - All Level3 - true - ProgramDatabase Size false + Use + commons.h NDEBUG;%(PreprocessorDefinitions) - 0x0409 ..\..\include\msapi - /ignore:4108 /PDBALTPATH:%_PDB% %(AdditionalOptions) - comctl32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - true + /PDBALTPATH:%_PDB% %(AdditionalOptions) + comctl32.lib;%(AdditionalDependencies) true 0x32100000 - $(ProfileDir)..\..\bin10\lib + $(ProfileDir)..\..\bin11\lib true true $(IntDir)$(TargetName).lib mir_core.dll + Windows + false - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/quickcontacts.tlb - - - Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) MultiThreadedDebugDLL - true Level3 - true EditAndContinue WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks false + Use + commons.h - NDEBUG;%(PreprocessorDefinitions) - 0x0409 + _DEBUG;%(PreprocessorDefinitions) ..\..\include\msapi - /ignore:4108 %(AdditionalOptions) - comctl32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - true true 0x32100000 - MachineX86 - $(ProfileDir)..\..\bin10\lib + $(ProfileDir)..\..\bin11\lib $(IntDir)$(TargetName).lib mir_core.dll + Windows + false + comctl32.lib;%(AdditionalDependencies) - - - NDEBUG;%(PreprocessorDefinitions) - true - true - .\Debug/quickcontacts.tlb - - - Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) MultiThreadedDebugDLL - true Level3 - true - ProgramDatabase WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks false + Use + commons.h - NDEBUG;%(PreprocessorDefinitions) - 0x0409 + _DEBUG;%(PreprocessorDefinitions) ..\..\include\msapi - /ignore:4108 %(AdditionalOptions) - comctl32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - true + comctl32.lib;%(AdditionalDependencies) true 0x32100000 - $(ProfileDir)..\..\bin10\lib + $(ProfileDir)..\..\bin11\lib $(IntDir)$(TargetName).lib mir_core.dll + Windows + false - - - + - + + NotUsing + - - - - - - + + Create + + diff --git a/plugins/QuickContacts/quickcontacts_11.vcxproj b/plugins/QuickContacts/quickcontacts_11.vcxproj index 28e3aa45a2..22c7be8d08 100644 --- a/plugins/QuickContacts/quickcontacts_11.vcxproj +++ b/plugins/QuickContacts/quickcontacts_11.vcxproj @@ -20,32 +20,27 @@ {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10} - quickcontacts QuickContacts DynamicLibrary - false Unicode v110_xp DynamicLibrary - false Unicode v110_xp DynamicLibrary - false Unicode true v110_xp DynamicLibrary - false Unicode true v110_xp @@ -55,27 +50,19 @@ - - - - <_ProjectFileVersion>10.0.40219.1 - false - false - true - true $(SolutionDir)$(Configuration)64\Plugins\ $(SolutionDir)$(Configuration)64\Plugins\ $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ @@ -84,85 +71,61 @@ $(SolutionDir)$(Configuration)\Plugins\ $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + true - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/quickcontacts.tlb - - - Full OnlyExplicitInline ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true - MultiThreadedDLL true - All Level3 - true - ProgramDatabase Size false + Use + commons.h NDEBUG;%(PreprocessorDefinitions) - 0x0409 ..\..\include\msapi - /ignore:4108 /PDBALTPATH:%_PDB% %(AdditionalOptions) - comctl32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - true + /PDBALTPATH:%_PDB% %(AdditionalOptions) + comctl32.lib;%(AdditionalDependencies) true 0x32100000 - MachineX86 $(ProfileDir)..\..\bin11\lib true true $(IntDir)$(TargetName).lib mir_core.dll + Windows + false - - - NDEBUG;%(PreprocessorDefinitions) - true - true - .\Release/quickcontacts.tlb - - - Full OnlyExplicitInline ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true - MultiThreadedDLL true - All Level3 - true - ProgramDatabase Size false + Use + commons.h NDEBUG;%(PreprocessorDefinitions) - 0x0409 ..\..\include\msapi - /ignore:4108 /PDBALTPATH:%_PDB% %(AdditionalOptions) - comctl32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - true + /PDBALTPATH:%_PDB% %(AdditionalOptions) + comctl32.lib;%(AdditionalDependencies) true 0x32100000 $(ProfileDir)..\..\bin11\lib @@ -170,109 +133,85 @@ true $(IntDir)$(TargetName).lib mir_core.dll + Windows + false - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/quickcontacts.tlb - - - Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) MultiThreadedDebugDLL - true Level3 - true EditAndContinue WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks false + Use + commons.h - NDEBUG;%(PreprocessorDefinitions) - 0x0409 + _DEBUG;%(PreprocessorDefinitions) ..\..\include\msapi - /ignore:4108 %(AdditionalOptions) - comctl32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - true true 0x32100000 - MachineX86 $(ProfileDir)..\..\bin11\lib $(IntDir)$(TargetName).lib mir_core.dll + Windows + false + comctl32.lib;%(AdditionalDependencies) - - - NDEBUG;%(PreprocessorDefinitions) - true - true - .\Debug/quickcontacts.tlb - - - Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) MultiThreadedDebugDLL - true Level3 - true - ProgramDatabase WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks false + Use + commons.h - NDEBUG;%(PreprocessorDefinitions) - 0x0409 + _DEBUG;%(PreprocessorDefinitions) ..\..\include\msapi - /ignore:4108 %(AdditionalOptions) - comctl32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - true + comctl32.lib;%(AdditionalDependencies) true 0x32100000 $(ProfileDir)..\..\bin11\lib $(IntDir)$(TargetName).lib mir_core.dll + Windows + false - - - + - + + NotUsing + - - - - - - + + Create + + diff --git a/plugins/QuickContacts/quickcontacts_11.vcxproj.filters b/plugins/QuickContacts/quickcontacts_11.vcxproj.filters index 8a3849ef60..7d4afda0c8 100644 --- a/plugins/QuickContacts/quickcontacts_11.vcxproj.filters +++ b/plugins/QuickContacts/quickcontacts_11.vcxproj.filters @@ -13,14 +13,8 @@ {f0bde4e2-7779-412c-a801-78220d6915cc} cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - {c5afa7ec-eb0e-45af-8ac8-157f4e55f107} - - - Header Files - Header Files @@ -33,6 +27,9 @@ Header Files + + Header Files + @@ -44,24 +41,16 @@ Source Files - - - - Docs - - - Docs - - - Docs - - - Docs - + + Source Files + Resource Files + + Resource Files + \ No newline at end of file diff --git a/plugins/QuickContacts/res/Version.rc b/plugins/QuickContacts/res/Version.rc new file mode 100644 index 0000000000..5bfbab4754 --- /dev/null +++ b/plugins/QuickContacts/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/QuickContacts/res/resource.rc b/plugins/QuickContacts/res/resource.rc index 4a3e24ebf6..8f9eccc374 100644 --- a/plugins/QuickContacts/res/resource.rc +++ b/plugins/QuickContacts/res/resource.rc @@ -7,8 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "../src/resource.h" -#include "winresrc.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -91,7 +90,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_OPT, DIALOG BEGIN @@ -112,7 +111,7 @@ END // Accelerator // -ACCEL_TABLE ACCELERATORS DISCARDABLE +ACCEL_TABLE ACCELERATORS BEGIN "A", HOTKEY_ALL_CONTACTS, VIRTKEY, CONTROL, NOINVERT "F", HOTKEY_FILE, VIRTKEY, CONTROL, NOINVERT @@ -123,38 +122,24 @@ BEGIN "V", HOTKEY_VOICE, VIRTKEY, CONTROL, NOINVERT END -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (Canada) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN -#pragma code_page(1252) -#endif //_WIN32 - #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN - "resource.h\0" + "..\\src\\resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN - "#include ""resource.h""\r\n" - "#include ""winresrc.h""\r\n" + "#include ""winres.h""\r\n" "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -162,7 +147,7 @@ END #endif // APSTUDIO_INVOKED -#endif // English (Canada) resources +#endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/plugins/QuickContacts/src/Version.h b/plugins/QuickContacts/src/Version.h new file mode 100644 index 0000000000..2bcb8dd9ea --- /dev/null +++ b/plugins/QuickContacts/src/Version.h @@ -0,0 +1,14 @@ +#define __MAJOR_VERSION 1 +#define __MINOR_VERSION 0 +#define __RELEASE_NUM 0 +#define __BUILD_NUM 0 + +#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM + +#define __PLUGIN_NAME "Quick contacts" +#define __FILENAME "QuickContacts.dll" +#define __DESCRIPTION "Open contact-specific windows by hotkey." +#define __AUTHOR "Ricardo Pescuma Domenecci, Heiko Schillinger" +#define __AUTHOREMAIL "pescuma@miranda-im.org" +#define __AUTHORWEB "http://miranda-ng.org/" +#define __COPYRIGHT "© 2007-2009 Ricardo Pescuma Domenecci" diff --git a/plugins/QuickContacts/src/commons.h b/plugins/QuickContacts/src/commons.h index c53689f1cd..a165d55010 100644 --- a/plugins/QuickContacts/src/commons.h +++ b/plugins/QuickContacts/src/commons.h @@ -22,51 +22,37 @@ Boston, MA 02111-1307, USA. #ifndef __COMMONS_H__ # define __COMMONS_H__ - #define WINVER 0x0500 + #include #include -#include -#include - -// Miranda headers -#define MIRANDA_VER 0x0A00 #include -#include -#include -#include #include #include -#include -#include #include #include #include #include #include -#include -#include #include #include #include #include +#include +#include +#include + #include #include -#include -#include #include -#include -#include +#include -#include "../utils/mir_memory.h" #include "../utils/mir_options.h" -#include "../utils/utf8_helpers.h" #include "resource.h" -#include "m_quickcontacts.h" #include "options.h" - +#include "Version.h" #define MODULE_NAME "QuickContacts" @@ -76,12 +62,6 @@ extern HINSTANCE hInst; extern char *metacontacts_proto; -#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) ) - - - - - // Copied from "../modernb/clc.h" /////////////////////////////////////////////////////////////////// //add a new hotkey so it has a default and can be changed in the options dialog diff --git a/plugins/QuickContacts/src/options.cpp b/plugins/QuickContacts/src/options.cpp index 6d5fd59a94..8e9edec9af 100644 --- a/plugins/QuickContacts/src/options.cpp +++ b/plugins/QuickContacts/src/options.cpp @@ -18,10 +18,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "options.h" - - +#include "commons.h" // Prototypes ///////////////////////////////////////////////////////////////////////////////////// @@ -99,7 +96,7 @@ static OptPageControl controls[] = { static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - int ret = SaveOptsDlgProc(controls, MAX_REGS(controls), MODULE_NAME, hwndDlg, msg, wParam, lParam); + int ret = SaveOptsDlgProc(controls, SIZEOF(controls), MODULE_NAME, hwndDlg, msg, wParam, lParam); switch (msg) { diff --git a/plugins/QuickContacts/src/options.h b/plugins/QuickContacts/src/options.h index 1036261bbb..9f9f5083c5 100644 --- a/plugins/QuickContacts/src/options.h +++ b/plugins/QuickContacts/src/options.h @@ -22,12 +22,6 @@ Boston, MA 02111-1307, USA. #ifndef __OPTIONS_H__ # define __OPTIONS_H__ - -#include "commons.h" - -#include - - #define TYPE_GLOBAL 0 #define TYPE_LOCAL 1 diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index 000af4664c..3bc7f4f355 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -18,22 +18,20 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #include "commons.h" - // Prototypes /////////////////////////////////////////////////////////////////////////// PLUGININFOEX pluginInfo={ sizeof(PLUGININFOEX), - "Quick Contacts", - PLUGIN_MAKE_VERSION(1,0,0,0), - "Open contact-specific windows by hotkey.", - "Ricardo Pescuma Domenecci, Heiko Schillinger", - "pescuma@miranda-im.org", - "© 2007-2009 Ricardo Pescuma Domenecci", - "http://pescuma.org/miranda/quickcontacts", + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, UNICODE_AWARE, // {F93BA59C-4F48-4F2E-8A91-77A2801527A3} {0xf93ba59c, 0x4f48, 0x4f2e, {0x8a, 0x91, 0x77, 0xa2, 0x80, 0x15, 0x27, 0xa3}} @@ -274,7 +272,7 @@ TCHAR *GetListName(c_struct *cs) { if (opts.group_append && cs->szgroup[0] != _T('\0')) { - mir_sntprintf(tmp_list_name, MAX_REGS(tmp_list_name), _T("%s (%s)"), cs->szname, cs->szgroup); + mir_sntprintf(tmp_list_name, SIZEOF(tmp_list_name), _T("%s (%s)"), cs->szname, cs->szgroup); return tmp_list_name; } else @@ -438,7 +436,7 @@ void LoadContacts(HWND hwndDlg, BOOL show_all) if (DBGetContactSettingTString(hMeta == NULL ? hContact : hMeta, "CList", "Group", &dbv) == 0) { if (dbv.ptszVal != NULL) - lstrcpyn(contact->szgroup, dbv.ptszVal, MAX_REGS(contact->szgroup)); + lstrcpyn(contact->szgroup, dbv.ptszVal, SIZEOF(contact->szgroup)); DBFreeVariant(&dbv); } @@ -446,12 +444,12 @@ void LoadContacts(HWND hwndDlg, BOOL show_all) // Make contact name TCHAR *tmp = (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, GCDNF_TCHAR); - lstrcpyn(contact->szname, tmp, MAX_REGS(contact->szname)); + lstrcpyn(contact->szname, tmp, SIZEOF(contact->szname)); PROTOACCOUNT *acc = ProtoGetAccount(pszProto); if (acc != NULL) { - lstrcpyn(contact->proto, acc->tszAccountName, MAX_REGS(contact->proto)); + lstrcpyn(contact->proto, acc->tszAccountName, SIZEOF(contact->proto)); } contact->hcontact = hContact; @@ -576,7 +574,7 @@ HANDLE GetSelectedContact(HWND hwndDlg) // Now try the name TCHAR cname[120] = _T(""); - GetDlgItemText(hwndDlg, IDC_USERNAME, cname, MAX_REGS(cname)); + GetDlgItemText(hwndDlg, IDC_USERNAME, cname, SIZEOF(cname)); for(int loop = 0; loop < contacts.getCount(); loop++) { @@ -618,7 +616,7 @@ LRESULT CALLBACK EditProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) int ret = SendMessage(hdlg,EM_GETSEL,(WPARAM)&start,(LPARAM)&end); - SendMessage(hdlg,WM_GETTEXT,(WPARAM)MAX_REGS(sztext),(LPARAM)sztext); + SendMessage(hdlg,WM_GETTEXT,(WPARAM)SIZEOF(sztext),(LPARAM)sztext); BOOL at_end = (lstrlen(sztext) == (int)end); @@ -638,7 +636,7 @@ LRESULT CALLBACK EditProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) } SendMessage(hdlg,EM_REPLACESEL,0,(LPARAM)sztext); - SendMessage(hdlg,WM_GETTEXT,(WPARAM)MAX_REGS(sztext),(LPARAM)sztext); + SendMessage(hdlg,WM_GETTEXT,(WPARAM)SIZEOF(sztext),(LPARAM)sztext); } CheckText(hdlg, sztext, !at_end); @@ -664,7 +662,7 @@ LRESULT CALLBACK EditProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) } else if (wparam == VK_DELETE) { - SendMessage(hdlg,WM_GETTEXT,(WPARAM)MAX_REGS(sztext),(LPARAM)sztext); + SendMessage(hdlg,WM_GETTEXT,(WPARAM)SIZEOF(sztext),(LPARAM)sztext); CheckText(hdlg, sztext, TRUE); } @@ -765,7 +763,7 @@ static void FillButton(HWND hwndDlg, int dlgItem, TCHAR *name, TCHAR *key, HICON if (key == NULL) full = TranslateTS(name); else - mir_sntprintf(full = tmp, MAX_REGS(tmp), _T("%s (%s)"), TranslateTS(name), key); + mir_sntprintf(full = tmp, SIZEOF(tmp), _T("%s (%s)"), TranslateTS(name), key); SendMessage(GetDlgItem(hwndDlg, dlgItem), BUTTONSETASFLATBTN, 0, 0); SendMessage(GetDlgItem(hwndDlg, dlgItem), BUTTONADDTOOLTIP, (LPARAM) full, BATF_TCHAR); @@ -780,7 +778,7 @@ static void FillCheckbox(HWND hwndDlg, int dlgItem, TCHAR *name, TCHAR *key) if (key == NULL) full = TranslateTS(name); else - mir_sntprintf(full = tmp, MAX_REGS(tmp), _T("%s (%s)"), TranslateTS(name), key); + mir_sntprintf(full = tmp, SIZEOF(tmp), _T("%s (%s)"), TranslateTS(name), key); SendMessage(GetDlgItem(hwndDlg, dlgItem), WM_SETTEXT, 0, (LPARAM) full); } @@ -1049,7 +1047,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if (SendMessage(hEdit, EM_GETSEL, 0, 0) != -1) SendMessage(hEdit, EM_REPLACESEL, 0, (LPARAM)_T("")); - SendMessage(hEdit, WM_GETTEXT, (WPARAM)MAX_REGS(sztext), (LPARAM)sztext); + SendMessage(hEdit, WM_GETTEXT, (WPARAM)SIZEOF(sztext), (LPARAM)sztext); // Fill combo BOOL all = IsDlgButtonChecked(hwndDlg, IDC_SHOW_ALL_CONTACTS); diff --git a/plugins/QuickContacts/src/stdafx.cpp b/plugins/QuickContacts/src/stdafx.cpp new file mode 100644 index 0000000000..550c908371 --- /dev/null +++ b/plugins/QuickContacts/src/stdafx.cpp @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org) + +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 version 2 +of the License. + +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, see . +*/ + +#include "commons.h" \ No newline at end of file -- cgit v1.2.3