summaryrefslogtreecommitdiff
path: root/plugins/KeyboardNotify
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/KeyboardNotify')
-rw-r--r--plugins/KeyboardNotify/KeyboardNotify_10.vcxproj8
-rw-r--r--plugins/KeyboardNotify/KeyboardNotify_11.vcxproj8
-rw-r--r--plugins/KeyboardNotify/src/Common.h1
-rw-r--r--plugins/KeyboardNotify/src/options.cpp72
4 files changed, 19 insertions, 70 deletions
diff --git a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj
index 8e98af2857..5963e895dd 100644
--- a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj
+++ b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj
@@ -86,7 +86,7 @@
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
</Link>
<ResourceCompile>
@@ -106,7 +106,7 @@
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -130,7 +130,7 @@
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -157,7 +157,7 @@
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
diff --git a/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj b/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj
index 96a5cb7c31..0e9879f5d3 100644
--- a/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj
+++ b/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj
@@ -90,7 +90,7 @@
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
@@ -111,7 +111,7 @@
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -135,7 +135,7 @@
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -161,7 +161,7 @@
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
diff --git a/plugins/KeyboardNotify/src/Common.h b/plugins/KeyboardNotify/src/Common.h
index 00705df8b6..f4e4f04282 100644
--- a/plugins/KeyboardNotify/src/Common.h
+++ b/plugins/KeyboardNotify/src/Common.h
@@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <commctrl.h>
#include <commdlg.h>
#include <winioctl.h>
+#include <Uxtheme.h>
#include <newpluginapi.h>
#include <m_database.h>
diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp
index c0245c5e2f..e72491c63a 100644
--- a/plugins/KeyboardNotify/src/options.cpp
+++ b/plugins/KeyboardNotify/src/options.cpp
@@ -20,44 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define IDI_BLANK 200
-#ifndef ETDT_ENABLE
-#define ETDT_ENABLE 0x00000002
-#endif
-#ifndef ETDT_USETABTEXTURE
-#define ETDT_USETABTEXTURE 0x00000004
-#endif
-#ifndef ETDT_ENABLETAB
-#define ETDT_ENABLETAB (ETDT_ENABLE|ETDT_USETABTEXTURE)
-#endif
-
-#ifndef ListView_SetCheckState
-#define ListView_SetCheckState(hLv, iItem, bCheck) \
- ListView_SetItemState(hLv, iItem, bCheck ? INDEXTOSTATEIMAGEMASK(2) : INDEXTOSTATEIMAGEMASK(1), LVIS_STATEIMAGEMASK)
-#endif
-
-#ifndef TVS_NOHSCROLL
-#define TVS_NOHSCROLL 0x8000
-#endif
-
-#ifndef TVM_GETITEMSTATE
-#define TVM_GETITEMSTATE (TV_FIRST+39)
-#endif
-
-#ifndef TreeView_SetItemState
-#define TreeView_SetItemState(hwndTv, hti, data, _mask) \
- { TVITEM _TVI; \
- _TVI.mask = TVIF_STATE; \
- _TVI.hItem = hti; \
- _TVI.stateMask = _mask; \
- _TVI.state = data; \
- SendMessageA((hwndTv), TVM_SETITEM, 0, (LPARAM)&_TVI); }
-#endif
-
-#ifndef TreeView_GetItemState
-#define TreeView_GetItemState(hwndTv, hti, mask) \
- (UINT)SendMessageA((hwndTv), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
-#endif
-
void LoadSettings(void);
int InitializeOptions(WPARAM,LPARAM);
INT_PTR CALLBACK DlgProcOptions(HWND, UINT, WPARAM, LPARAM);
@@ -124,20 +86,11 @@ PROCESS_LIST ProcessListAux;
XSTATUS_INFO *XstatusListAux;
BYTE trillianLedsMsg, trillianLedsURL, trillianLedsFile, trillianLedsOther;
-static BOOL (WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
-
-
// **
// ** Initialize the Miranda options page
// **
int InitializeOptions(WPARAM wParam,LPARAM lParam)
{
- if (bWindowsNT && dWinVer >= 5.01) {
- HMODULE hUxTheme = GetModuleHandle(L"uxtheme.dll");
- if(hUxTheme)
- pfnEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
- }
-
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 0;
@@ -158,7 +111,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
switch (msg) {
case WM_INITDIALOG:
{
- HWND tc;
+ HWND tc;
TCITEM tci;
tc = GetDlgItem(hwndDlg, IDC_TABS);
tci.mask = TCIF_TEXT;
@@ -172,27 +125,22 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
TabCtrl_InsertItem(tc, 3, &tci);
tci.pszText = TranslateT("Ignore");
TabCtrl_InsertItem(tc, 4, &tci);
-
+
hwndProto = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_PROTO_OPTIONS), hwndDlg, DlgProcProtoOptions, (LPARAM) NULL);
- if(hwndProto && pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hwndProto, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hwndProto, ETDT_ENABLETAB);
SetWindowPos(hwndProto, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
ShowWindow(hwndProto, SW_SHOW);
hwndBasic = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_BASIC_OPTIONS), hwndDlg, DlgProcBasicOptions, (LPARAM) NULL);
- if(hwndBasic && pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hwndBasic, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hwndBasic, ETDT_ENABLETAB);
SetWindowPos(hwndBasic, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
hwndEffect = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_EFFECT_OPTIONS), hwndDlg, DlgProcEffectOptions, (LPARAM) NULL);
- if(hwndEffect && pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hwndEffect, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hwndEffect, ETDT_ENABLETAB);
SetWindowPos(hwndEffect, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
hwndTheme = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_THEME_OPTIONS), hwndDlg, DlgProcThemeOptions, (LPARAM) NULL);
- if(hwndTheme && pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hwndTheme, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hwndTheme, ETDT_ENABLETAB);
SetWindowPos(hwndTheme, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
hwndIgnore = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_IGNORE_OPTIONS), hwndDlg, DlgProcIgnoreOptions, (LPARAM) NULL);
- if(hwndIgnore && pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hwndIgnore, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hwndIgnore, ETDT_ENABLETAB);
SetWindowPos(hwndIgnore, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
hwndCurrentTab = hwndProto;
return TRUE;
@@ -204,7 +152,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
{
switch (((LPNMHDR) lParam)->code) {
case TCN_SELCHANGE:
- switch (wParam) {
+ switch (wParam) {
case IDC_TABS:
{
HWND hwnd;
@@ -318,7 +266,7 @@ INT_PTR CALLBACK DlgProcProtoOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
ListView_GetItem(hList, &lvItem);
db_set_b(NULL, KEYBDMODULE, (char *)lvItem.lParam, (BYTE)!!ListView_GetCheckState(hList, lvItem.iItem));
}
- }
+ }
LoadSettings();
@@ -340,7 +288,7 @@ INT_PTR CALLBACK DlgProcProtoOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
} //switch idFrom
}
break; //End WM_NOTIFY
-
+
default:
break;
}