diff options
Diffstat (limited to 'plugins/Clist_nicer/skineditor')
-rw-r--r-- | plugins/Clist_nicer/skineditor/res/Version.rc | 38 | ||||
-rw-r--r-- | plugins/Clist_nicer/skineditor/res/skinedit.rc | 76 | ||||
-rw-r--r-- | plugins/Clist_nicer/skineditor/skinedit_11.vcxproj | 10 | ||||
-rw-r--r-- | plugins/Clist_nicer/skineditor/skinedit_11.vcxproj.filters | 6 | ||||
-rw-r--r-- | plugins/Clist_nicer/skineditor/src/Version.h | 14 | ||||
-rw-r--r-- | plugins/Clist_nicer/skineditor/src/commonheaders.h | 28 | ||||
-rw-r--r-- | plugins/Clist_nicer/skineditor/src/main.cpp | 1534 | ||||
-rw-r--r-- | plugins/Clist_nicer/skineditor/src/skineditres.h | 4 |
8 files changed, 845 insertions, 865 deletions
diff --git a/plugins/Clist_nicer/skineditor/res/Version.rc b/plugins/Clist_nicer/skineditor/res/Version.rc new file mode 100644 index 0000000000..5bfbab4754 --- /dev/null +++ b/plugins/Clist_nicer/skineditor/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/Clist_nicer/skineditor/res/skinedit.rc b/plugins/Clist_nicer/skineditor/res/skinedit.rc index c5d8875b20..a321c9e146 100644 --- a/plugins/Clist_nicer/skineditor/res/skinedit.rc +++ b/plugins/Clist_nicer/skineditor/res/skinedit.rc @@ -7,19 +7,17 @@ //
// Generated from the TEXTINCLUDE 2 resource.
//
-#include <windows.h>
#include <winres.h>
+
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// Neutral resources
+// Русский (Россия) resources
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
-#ifdef _WIN32
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-#pragma code_page(1252)
-#endif //_WIN32
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+#pragma code_page(1251)
/////////////////////////////////////////////////////////////////////////////
//
@@ -81,61 +79,6 @@ BEGIN END
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-#ifndef APSTUDIO_INVOKED
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,0,0,1
- PRODUCTVERSION 0,0,0,1
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
-
- BEGIN
- BLOCK "0c0704b0"
- BEGIN
- VALUE "FileDescription", "Skin Editor"
- VALUE "FileVersion", "0, 0, 0, 2"
- VALUE "InternalName", "CLN SkinEdit"
- VALUE "LegalCopyright", "Copyright (C) 2006"
- VALUE "LegalTrademarks", "GPL"
- VALUE "OriginalFilename", "cln_skinedit.dll"
- VALUE "ProductName", "Clist Nicer+ skin editor"
- VALUE "ProductVersion", "0, 0, 0, 2"
- END
- END
-
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0xc07, 1200
- END
-END
-#endif
-
-#endif // Neutral resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
@@ -144,23 +87,24 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 TEXTINCLUDE
BEGIN
- "..\src\skineditres.h\0"
+ "..\\src\\skineditres.h\0"
END
2 TEXTINCLUDE
BEGIN
- "#include <windows.h>\r\n"
- "#include <winres.h>\0"
+ "#include <winres.h>\r\n"
+ "\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
+ "\0"
END
#endif // APSTUDIO_INVOKED
-#endif // English (U.S.) resources
+#endif // Русский (Россия) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Clist_nicer/skineditor/skinedit_11.vcxproj b/plugins/Clist_nicer/skineditor/skinedit_11.vcxproj index 1bd9df881f..efde59d372 100644 --- a/plugins/Clist_nicer/skineditor/skinedit_11.vcxproj +++ b/plugins/Clist_nicer/skineditor/skinedit_11.vcxproj @@ -89,7 +89,7 @@ </ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -116,7 +116,7 @@ </ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -143,7 +143,7 @@ </ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -169,7 +169,7 @@ </ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -185,10 +185,12 @@ </ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\skinedit.rc" />
+ <ResourceCompile Include="res\Version.rc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\commonheaders.h" />
<ClInclude Include="src\skineditres.h" />
+ <ClInclude Include="src\Version.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/plugins/Clist_nicer/skineditor/skinedit_11.vcxproj.filters b/plugins/Clist_nicer/skineditor/skinedit_11.vcxproj.filters index 9527aaed45..ef12ffed19 100644 --- a/plugins/Clist_nicer/skineditor/skinedit_11.vcxproj.filters +++ b/plugins/Clist_nicer/skineditor/skinedit_11.vcxproj.filters @@ -23,6 +23,9 @@ <ResourceCompile Include="res\skinedit.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
+ <ResourceCompile Include="res\Version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\commonheaders.h">
@@ -31,5 +34,8 @@ <ClInclude Include="src\skineditres.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/Clist_nicer/skineditor/src/Version.h b/plugins/Clist_nicer/skineditor/src/Version.h new file mode 100644 index 0000000000..9fdf89b6a8 --- /dev/null +++ b/plugins/Clist_nicer/skineditor/src/Version.h @@ -0,0 +1,14 @@ +#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 0
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 4
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+
+#define __PLUGIN_NAME "Skin editor for clist nicer"
+#define __FILENAME "Cln_skinedit.dll"
+#define __DESCRIPTION "Allows inline skin item editing for clist nicer."
+#define __AUTHOR "Nightwish, Pixel"
+#define __AUTHOREMAIL ""
+#define __AUTHORWEB "http://miranda-ng.org/"
+#define __COPYRIGHT "Copyright 2000-2006 Miranda-IM project"
diff --git a/plugins/Clist_nicer/skineditor/src/commonheaders.h b/plugins/Clist_nicer/skineditor/src/commonheaders.h index 3692962393..3a7ae2e8d8 100644 --- a/plugins/Clist_nicer/skineditor/src/commonheaders.h +++ b/plugins/Clist_nicer/skineditor/src/commonheaders.h @@ -24,37 +24,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _CRT_SECURE_NO_WARNINGS
#define _WIN32_WINNT 0x0501
-#include <m_stdhdr.h>
-
#include <windows.h>
#include <commctrl.h>
-#include <stdio.h>
#include <time.h>
-#include <stddef.h>
-#include <process.h>
-#include <io.h>
-#include <string.h>
-#include <direct.h>
-#include <math.h>
-#include <win2k.h>
+
#include <newpluginapi.h>
-#include <m_clist.h>
-#include <m_clc.h>
-#include <m_clui.h>
-#include <m_system.h>
#include <m_database.h>
#include <m_langpack.h>
-#include <m_button.h>
-#include <m_options.h>
#include <m_protosvc.h>
-#include <m_utils.h>
-#include <m_skin.h>
-#include <m_contacts.h>
-#include <m_file.h>
-#include <m_addcontact.h>
-#include <m_png.h>
#include "../../src/include/m_cln_skinedit.h"
-
-// shared vars
-extern HINSTANCE g_hInst;
+#include "Version.h"
+#include "skineditres.h"
diff --git a/plugins/Clist_nicer/skineditor/src/main.cpp b/plugins/Clist_nicer/skineditor/src/main.cpp index 917597642a..9037525b23 100644 --- a/plugins/Clist_nicer/skineditor/src/main.cpp +++ b/plugins/Clist_nicer/skineditor/src/main.cpp @@ -13,30 +13,30 @@ of the License, or (at your option) any later version. 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
+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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "commonheaders.h"
-#include "skineditres.h"
-#define ID_EXTBKSEPARATOR 40200
+#define ID_EXTBKSEPARATOR 40200
PLUGININFOEX pluginInfo = {
- sizeof(PLUGININFOEX),
- "Skin editor for clist_nicer+",
- PLUGIN_MAKE_VERSION(0, 0, 0, 4),
- "Allows inline skin item editing for clist nicer+.",
- "Nightwish, Pixel",
- "",
- "Copyright 2000-2006 Miranda-IM project",
- "http://miranda-ng.org/",
- UNICODE_AWARE,
- {0x21948c89, 0xb549, 0x4c9d, { 0x8b, 0x4f, 0x3f, 0x37, 0x26, 0xec, 0x6b, 0x4b }}
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE,
+ // {21948C89-B549-4C9D-8B4F-3F3726EC6B4B}
+ {0x21948c89, 0xb549, 0x4c9d, {0x8b, 0x4f, 0x3f, 0x37, 0x26, 0xec, 0x6b, 0x4b}}
};
HINSTANCE g_hInst = 0;
@@ -50,8 +50,8 @@ static int last_selcount = 0; static int last_indizes[64];
static int ID_EXTBK_LAST = 0, ID_EXTBK_FIRST = 0;
-/*
- * prototypes
+/*
+ * prototypes
*/
static void ChangeControlItems(HWND hwndDlg, int status, int except);
@@ -59,562 +59,561 @@ static BOOL CheckItem(int item, HWND hwndDlg); static void ReActiveCombo(HWND hwndDlg)
{
- if (IsDlgButtonChecked(hwndDlg, IDC_IGNORE)) {
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_LR), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_RL), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_TB), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_BT), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_BASECOLOUR2), !IsDlgButtonChecked(hwndDlg, IDC_COLOR2_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR2LABLE), !IsDlgButtonChecked(hwndDlg, IDC_COLOR2_TRANSPARENT));
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TL), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TR), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BR), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BL), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
- ChangeControlItems(hwndDlg, !IsDlgButtonChecked(hwndDlg, IDC_IGNORE), IDC_IGNORE);
- } else {
- ChangeControlItems(hwndDlg, !IsDlgButtonChecked(hwndDlg, IDC_IGNORE), IDC_IGNORE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_LR), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_RL), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_TB), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_BT), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_BASECOLOUR2), !IsDlgButtonChecked(hwndDlg, IDC_COLOR2_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR2LABLE), !IsDlgButtonChecked(hwndDlg, IDC_COLOR2_TRANSPARENT));
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TL), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TR), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BR), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BL), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
- }
+ if (IsDlgButtonChecked(hwndDlg, IDC_IGNORE)) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_LR), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_RL), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_TB), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_BT), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
+
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BASECOLOUR2), !IsDlgButtonChecked(hwndDlg, IDC_COLOR2_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR2LABLE), !IsDlgButtonChecked(hwndDlg, IDC_COLOR2_TRANSPARENT));
+
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TL), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TR), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BR), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BL), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
+ ChangeControlItems(hwndDlg, !IsDlgButtonChecked(hwndDlg, IDC_IGNORE), IDC_IGNORE);
+ } else {
+ ChangeControlItems(hwndDlg, !IsDlgButtonChecked(hwndDlg, IDC_IGNORE), IDC_IGNORE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_LR), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_RL), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_TB), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_BT), IsDlgButtonChecked(hwndDlg, IDC_GRADIENT));
+
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BASECOLOUR2), !IsDlgButtonChecked(hwndDlg, IDC_COLOR2_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR2LABLE), !IsDlgButtonChecked(hwndDlg, IDC_COLOR2_TRANSPARENT));
+
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TL), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TR), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BR), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BL), IsDlgButtonChecked(hwndDlg, IDC_CORNER));
+ }
}
// enabled or disabled the whole status controlitems group (with exceptional control)
static void ChangeControlItems(HWND hwndDlg, int status, int except)
{
- if (except != IDC_GRADIENT)
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT), status);
- if (except != IDC_GRADIENT_LR)
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_LR), status);
- if (except != IDC_GRADIENT_RL)
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_RL), status);
- if (except != IDC_GRADIENT_TB)
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_TB), status);
- if (except != IDC_GRADIENT_BT)
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_BT), status);
- if (except != IDC_CORNER)
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER), status);
- if (except != IDC_CORNER_TL)
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TL), status);
- if (except != IDC_CORNER_TR)
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TR), status);
- if (except != IDC_CORNER_BR)
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BR), status);
- if (except != IDC_CORNER_BL)
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BL), status);
- if (except != IDC_CORNER_TL)
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TL), status);
- if (except != IDC_MARGINLABLE)
- EnableWindow(GetDlgItem(hwndDlg, IDC_MARGINLABLE), status);
- if (except != IDC_MRGN_TOP)
- EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_TOP), status);
- if (except != IDC_MRGN_RIGHT)
- EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_RIGHT), status);
- if (except != IDC_MRGN_BOTTOM)
- EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_BOTTOM), status);
- if (except != IDC_MRGN_LEFT)
- EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_LEFT), status);
- if (except != IDC_MRGN_TOP_SPIN)
- EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_TOP_SPIN), status);
- if (except != IDC_MRGN_RIGHT_SPIN)
- EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_RIGHT_SPIN), status);
- if (except != IDC_MRGN_BOTTOM_SPIN)
- EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_BOTTOM_SPIN), status);
- if (except != IDC_MRGN_LEFT_SPIN)
- EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_LEFT_SPIN), status);
- if (except != IDC_BASECOLOUR)
- EnableWindow(GetDlgItem(hwndDlg, IDC_BASECOLOUR), status);
- if (except != IDC_COLORLABLE)
- EnableWindow(GetDlgItem(hwndDlg, IDC_COLORLABLE), status);
- if (except != IDC_BASECOLOUR2)
- EnableWindow(GetDlgItem(hwndDlg, IDC_BASECOLOUR2), status);
- if (except != IDC_COLOR2LABLE)
- EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR2LABLE), status);
- if (except != IDC_COLOR2_TRANSPARENT)
- EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR2_TRANSPARENT), status);
- if (except != IDC_TEXTCOLOUR)
- EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOUR), status);
- if (except != IDC_TEXTCOLOURLABLE)
- EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOURLABLE), status);
-
- if (except != IDC_ALPHA)
- EnableWindow(GetDlgItem(hwndDlg, IDC_ALPHA), status);
- if (except != IDC_ALPHASPIN)
- EnableWindow(GetDlgItem(hwndDlg, IDC_ALPHASPIN), status);
- if (except != IDC_ALPHALABLE)
- EnableWindow(GetDlgItem(hwndDlg, IDC_ALPHALABLE), status);
- if (except != IDC_IGNORE)
- EnableWindow(GetDlgItem(hwndDlg, IDC_IGNORE), status);
-
- if (except != IDC_BORDERTYPE)
- EnableWindow(GetDlgItem(hwndDlg, IDC_BORDERTYPE), status);
-
+ if (except != IDC_GRADIENT)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT), status);
+ if (except != IDC_GRADIENT_LR)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_LR), status);
+ if (except != IDC_GRADIENT_RL)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_RL), status);
+ if (except != IDC_GRADIENT_TB)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_TB), status);
+ if (except != IDC_GRADIENT_BT)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_BT), status);
+ if (except != IDC_CORNER)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER), status);
+ if (except != IDC_CORNER_TL)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TL), status);
+ if (except != IDC_CORNER_TR)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TR), status);
+ if (except != IDC_CORNER_BR)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BR), status);
+ if (except != IDC_CORNER_BL)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BL), status);
+ if (except != IDC_CORNER_TL)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TL), status);
+ if (except != IDC_MARGINLABLE)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MARGINLABLE), status);
+ if (except != IDC_MRGN_TOP)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_TOP), status);
+ if (except != IDC_MRGN_RIGHT)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_RIGHT), status);
+ if (except != IDC_MRGN_BOTTOM)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_BOTTOM), status);
+ if (except != IDC_MRGN_LEFT)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_LEFT), status);
+ if (except != IDC_MRGN_TOP_SPIN)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_TOP_SPIN), status);
+ if (except != IDC_MRGN_RIGHT_SPIN)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_RIGHT_SPIN), status);
+ if (except != IDC_MRGN_BOTTOM_SPIN)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_BOTTOM_SPIN), status);
+ if (except != IDC_MRGN_LEFT_SPIN)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MRGN_LEFT_SPIN), status);
+ if (except != IDC_BASECOLOUR)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BASECOLOUR), status);
+ if (except != IDC_COLORLABLE)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_COLORLABLE), status);
+ if (except != IDC_BASECOLOUR2)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BASECOLOUR2), status);
+ if (except != IDC_COLOR2LABLE)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR2LABLE), status);
+ if (except != IDC_COLOR2_TRANSPARENT)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR2_TRANSPARENT), status);
+ if (except != IDC_TEXTCOLOUR)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOUR), status);
+ if (except != IDC_TEXTCOLOURLABLE)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOURLABLE), status);
+
+ if (except != IDC_ALPHA)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ALPHA), status);
+ if (except != IDC_ALPHASPIN)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ALPHASPIN), status);
+ if (except != IDC_ALPHALABLE)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ALPHALABLE), status);
+ if (except != IDC_IGNORE)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_IGNORE), status);
+
+ if (except != IDC_BORDERTYPE)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BORDERTYPE), status);
}
static void FillOptionDialogByStatusItem(HWND hwndDlg, StatusItems_t *item)
{
- char itoabuf[15];
- DWORD ret;
- int index;
-
- CheckDlgButton(hwndDlg, IDC_IGNORE, (item->IGNORED) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_GRADIENT, (item->GRADIENT & GRADIENT_ACTIVE) ? BST_CHECKED : BST_UNCHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_LR), item->GRADIENT & GRADIENT_ACTIVE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_RL), item->GRADIENT & GRADIENT_ACTIVE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_TB), item->GRADIENT & GRADIENT_ACTIVE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_BT), item->GRADIENT & GRADIENT_ACTIVE);
- CheckDlgButton(hwndDlg, IDC_GRADIENT_LR, (item->GRADIENT & GRADIENT_LR) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_GRADIENT_RL, (item->GRADIENT & GRADIENT_RL) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_GRADIENT_TB, (item->GRADIENT & GRADIENT_TB) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_GRADIENT_BT, (item->GRADIENT & GRADIENT_BT) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_CORNER, (item->CORNER & CORNER_ACTIVE) ? BST_CHECKED : BST_UNCHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TL), item->CORNER & CORNER_ACTIVE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TR), item->CORNER & CORNER_ACTIVE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BR), item->CORNER & CORNER_ACTIVE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BL), item->CORNER & CORNER_ACTIVE);
-
- CheckDlgButton(hwndDlg, IDC_CORNER_TL, (item->CORNER & CORNER_TL) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CORNER_TR, (item->CORNER & CORNER_TR) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CORNER_BR, (item->CORNER & CORNER_BR) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CORNER_BL, (item->CORNER & CORNER_BL) ? BST_CHECKED : BST_UNCHECKED);
-
- ret = item->COLOR;
- SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR, CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_COLOR);
- SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR, CPM_SETCOLOUR, 0, ret);
-
- ret = item->COLOR2;
- SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR2, CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_COLOR2);
- SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR2, CPM_SETCOLOUR, 0, ret);
-
- CheckDlgButton(hwndDlg, IDC_COLOR2_TRANSPARENT, (item->COLOR2_TRANSPARENT) ? BST_CHECKED : BST_UNCHECKED);
-
- ret = item->TEXTCOLOR;
- SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOUR, CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_TEXTCOLOR);
- SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOUR, CPM_SETCOLOUR, 0, ret);
-
- if (item->ALPHA == -1) {
- SetDlgItemTextA(hwndDlg, IDC_ALPHA, "");
- } else {
- ret = item->ALPHA;
- _itoa(ret, itoabuf, 10);
- SetDlgItemTextA(hwndDlg, IDC_ALPHA, itoabuf);
- }
-
- if (item->MARGIN_LEFT == -1)
- SetDlgItemTextA(hwndDlg, IDC_MRGN_LEFT, "");
- else {
- ret = item->MARGIN_LEFT;
- _itoa(ret, itoabuf, 10);
- SetDlgItemTextA(hwndDlg, IDC_MRGN_LEFT, itoabuf);
- }
-
- if (item->MARGIN_TOP == -1)
- SetDlgItemTextA(hwndDlg, IDC_MRGN_TOP, "");
- else {
- ret = item->MARGIN_TOP;
- _itoa(ret, itoabuf, 10);
- SetDlgItemTextA(hwndDlg, IDC_MRGN_TOP, itoabuf);
- }
-
- if (item->MARGIN_RIGHT == -1)
- SetDlgItemTextA(hwndDlg, IDC_MRGN_RIGHT, "");
- else {
- ret = item->MARGIN_RIGHT;
- _itoa(ret, itoabuf, 10);
- SetDlgItemTextA(hwndDlg, IDC_MRGN_RIGHT, itoabuf);
- }
-
- if (item->MARGIN_BOTTOM == -1)
- SetDlgItemTextA(hwndDlg, IDC_MRGN_BOTTOM, "");
- else {
- ret = item->MARGIN_BOTTOM;
- _itoa(ret, itoabuf, 10);
- SetDlgItemTextA(hwndDlg, IDC_MRGN_BOTTOM, itoabuf);
- }
- if(item->BORDERSTYLE == -1)
- SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_SETCURSEL, 0, 0);
- else {
- index = 0;
- switch(item->BORDERSTYLE) {
- case 0:
- case -1:
- index = 0;
- break;
- case BDR_RAISEDOUTER:
- index = 1;
- break;
- case BDR_SUNKENINNER:
- index = 2;
- break;
- case EDGE_BUMP:
- index = 3;
- break;
- case EDGE_ETCHED:
- index = 4;
- break;
- }
- SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_SETCURSEL, (WPARAM)index, 0);
- }
- ReActiveCombo(hwndDlg);
+ char itoabuf[15];
+ DWORD ret;
+ int index;
+
+ CheckDlgButton(hwndDlg, IDC_IGNORE, (item->IGNORED) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_GRADIENT, (item->GRADIENT & GRADIENT_ACTIVE) ? BST_CHECKED : BST_UNCHECKED);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_LR), item->GRADIENT & GRADIENT_ACTIVE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_RL), item->GRADIENT & GRADIENT_ACTIVE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_TB), item->GRADIENT & GRADIENT_ACTIVE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_GRADIENT_BT), item->GRADIENT & GRADIENT_ACTIVE);
+ CheckDlgButton(hwndDlg, IDC_GRADIENT_LR, (item->GRADIENT & GRADIENT_LR) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_GRADIENT_RL, (item->GRADIENT & GRADIENT_RL) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_GRADIENT_TB, (item->GRADIENT & GRADIENT_TB) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_GRADIENT_BT, (item->GRADIENT & GRADIENT_BT) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_CORNER, (item->CORNER & CORNER_ACTIVE) ? BST_CHECKED : BST_UNCHECKED);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TL), item->CORNER & CORNER_ACTIVE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_TR), item->CORNER & CORNER_ACTIVE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BR), item->CORNER & CORNER_ACTIVE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CORNER_BL), item->CORNER & CORNER_ACTIVE);
+
+ CheckDlgButton(hwndDlg, IDC_CORNER_TL, (item->CORNER & CORNER_TL) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CORNER_TR, (item->CORNER & CORNER_TR) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CORNER_BR, (item->CORNER & CORNER_BR) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CORNER_BL, (item->CORNER & CORNER_BL) ? BST_CHECKED : BST_UNCHECKED);
+
+ ret = item->COLOR;
+ SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR, CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_COLOR);
+ SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR, CPM_SETCOLOUR, 0, ret);
+
+ ret = item->COLOR2;
+ SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR2, CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_COLOR2);
+ SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR2, CPM_SETCOLOUR, 0, ret);
+
+ CheckDlgButton(hwndDlg, IDC_COLOR2_TRANSPARENT, (item->COLOR2_TRANSPARENT) ? BST_CHECKED : BST_UNCHECKED);
+
+ ret = item->TEXTCOLOR;
+ SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOUR, CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_TEXTCOLOR);
+ SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOUR, CPM_SETCOLOUR, 0, ret);
+
+ if (item->ALPHA == -1) {
+ SetDlgItemTextA(hwndDlg, IDC_ALPHA, "");
+ } else {
+ ret = item->ALPHA;
+ _itoa(ret, itoabuf, 10);
+ SetDlgItemTextA(hwndDlg, IDC_ALPHA, itoabuf);
+ }
+
+ if (item->MARGIN_LEFT == -1)
+ SetDlgItemTextA(hwndDlg, IDC_MRGN_LEFT, "");
+ else {
+ ret = item->MARGIN_LEFT;
+ _itoa(ret, itoabuf, 10);
+ SetDlgItemTextA(hwndDlg, IDC_MRGN_LEFT, itoabuf);
+ }
+
+ if (item->MARGIN_TOP == -1)
+ SetDlgItemTextA(hwndDlg, IDC_MRGN_TOP, "");
+ else {
+ ret = item->MARGIN_TOP;
+ _itoa(ret, itoabuf, 10);
+ SetDlgItemTextA(hwndDlg, IDC_MRGN_TOP, itoabuf);
+ }
+
+ if (item->MARGIN_RIGHT == -1)
+ SetDlgItemTextA(hwndDlg, IDC_MRGN_RIGHT, "");
+ else {
+ ret = item->MARGIN_RIGHT;
+ _itoa(ret, itoabuf, 10);
+ SetDlgItemTextA(hwndDlg, IDC_MRGN_RIGHT, itoabuf);
+ }
+
+ if (item->MARGIN_BOTTOM == -1)
+ SetDlgItemTextA(hwndDlg, IDC_MRGN_BOTTOM, "");
+ else {
+ ret = item->MARGIN_BOTTOM;
+ _itoa(ret, itoabuf, 10);
+ SetDlgItemTextA(hwndDlg, IDC_MRGN_BOTTOM, itoabuf);
+ }
+ if(item->BORDERSTYLE == -1)
+ SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_SETCURSEL, 0, 0);
+ else {
+ index = 0;
+ switch(item->BORDERSTYLE) {
+ case 0:
+ case -1:
+ index = 0;
+ break;
+ case BDR_RAISEDOUTER:
+ index = 1;
+ break;
+ case BDR_SUNKENINNER:
+ index = 2;
+ break;
+ case EDGE_BUMP:
+ index = 3;
+ break;
+ case EDGE_ETCHED:
+ index = 4;
+ break;
+ }
+ SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_SETCURSEL, (WPARAM)index, 0);
+ }
+ ReActiveCombo(hwndDlg);
}
// update dlg with selected item
static void FillOptionDialogByCurrentSel(HWND hwndDlg)
{
- int index = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETCURSEL, 0, 0);
- int itemData = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETITEMDATA, index, 0);
- if(itemData != ID_EXTBKSEPARATOR) {
- LastModifiedItem = itemData - ID_EXTBK_FIRST;
-
- if (CheckItem(itemData - ID_EXTBK_FIRST, hwndDlg)) {
- FillOptionDialogByStatusItem(hwndDlg, &StatusItems[itemData - ID_EXTBK_FIRST]);
- }
- }
+ int index = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETCURSEL, 0, 0);
+ int itemData = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETITEMDATA, index, 0);
+ if(itemData != ID_EXTBKSEPARATOR) {
+ LastModifiedItem = itemData - ID_EXTBK_FIRST;
+
+ if (CheckItem(itemData - ID_EXTBK_FIRST, hwndDlg)) {
+ FillOptionDialogByStatusItem(hwndDlg, &StatusItems[itemData - ID_EXTBK_FIRST]);
+ }
+ }
}
// enabled all status controls if the selected item is a separator
static BOOL CheckItem(int item, HWND hwndDlg)
{
- if (StatusItems[item].statusID == ID_EXTBKSEPARATOR) {
- ChangeControlItems(hwndDlg, 0, 0);
- return FALSE;
- } else {
- ChangeControlItems(hwndDlg, 1, 0);
- return TRUE;
- }
+ if (StatusItems[item].statusID == ID_EXTBKSEPARATOR) {
+ ChangeControlItems(hwndDlg, 0, 0);
+ return FALSE;
+ } else {
+ ChangeControlItems(hwndDlg, 1, 0);
+ return TRUE;
+ }
}
static void SetChangedStatusItemFlag(WPARAM wParam, HWND hwndDlg)
{
- if (LOWORD(wParam) != IDC_ITEMS
- && (GetDlgItem(hwndDlg, LOWORD(wParam)) == GetFocus() || HIWORD(wParam) == CPN_COLOURCHANGED)
- && (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == EN_CHANGE || HIWORD(wParam) == CPN_COLOURCHANGED)) {
- switch (LOWORD(wParam)) {
- case IDC_IGNORE:
- ChangedSItems.bIGNORED = TRUE; break;
- case IDC_GRADIENT:
- ChangedSItems.bGRADIENT = TRUE; break;
- case IDC_GRADIENT_LR:
- ChangedSItems.bGRADIENT = TRUE;break;
- case IDC_GRADIENT_RL:
- ChangedSItems.bGRADIENT = TRUE; break;
- case IDC_GRADIENT_BT:
- ChangedSItems.bGRADIENT = TRUE; break;
- case IDC_GRADIENT_TB:
- ChangedSItems.bGRADIENT = TRUE; break;
-
- case IDC_CORNER:
- ChangedSItems.bCORNER = TRUE; break;
- case IDC_CORNER_TL:
- ChangedSItems.bCORNER = TRUE; break;
- case IDC_CORNER_TR:
- ChangedSItems.bCORNER = TRUE; break;
- case IDC_CORNER_BR:
- ChangedSItems.bCORNER = TRUE; break;
- case IDC_CORNER_BL:
- ChangedSItems.bCORNER = TRUE; break;
-
- case IDC_BASECOLOUR:
- ChangedSItems.bCOLOR = TRUE; break;
- case IDC_BASECOLOUR2:
- ChangedSItems.bCOLOR2 = TRUE; break;
- case IDC_COLOR2_TRANSPARENT:
- ChangedSItems.bCOLOR2_TRANSPARENT = TRUE; break;
- case IDC_TEXTCOLOUR:
- ChangedSItems.bTEXTCOLOR = TRUE; break;
-
- case IDC_ALPHA:
- ChangedSItems.bALPHA = TRUE; break;
- case IDC_ALPHASPIN:
- ChangedSItems.bALPHA = TRUE; break;
-
- case IDC_MRGN_LEFT:
- ChangedSItems.bMARGIN_LEFT = TRUE; break;
- case IDC_MRGN_LEFT_SPIN:
- ChangedSItems.bMARGIN_LEFT = TRUE; break;
-
- case IDC_MRGN_TOP:
- ChangedSItems.bMARGIN_TOP = TRUE; break;
- case IDC_MRGN_TOP_SPIN:
- ChangedSItems.bMARGIN_TOP = TRUE; break;
-
- case IDC_MRGN_RIGHT:
- ChangedSItems.bMARGIN_RIGHT = TRUE; break;
- case IDC_MRGN_RIGHT_SPIN:
- ChangedSItems.bMARGIN_RIGHT = TRUE; break;
-
- case IDC_MRGN_BOTTOM:
- ChangedSItems.bMARGIN_BOTTOM = TRUE; break;
- case IDC_MRGN_BOTTOM_SPIN:
- ChangedSItems.bMARGIN_BOTTOM = TRUE; break;
-
- case IDC_BORDERTYPE:
- ChangedSItems.bBORDERSTYLE = TRUE; break;
- }
- }
+ if (LOWORD(wParam) != IDC_ITEMS
+ && (GetDlgItem(hwndDlg, LOWORD(wParam)) == GetFocus() || HIWORD(wParam) == CPN_COLOURCHANGED)
+ && (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == EN_CHANGE || HIWORD(wParam) == CPN_COLOURCHANGED)) {
+ switch (LOWORD(wParam)) {
+ case IDC_IGNORE:
+ ChangedSItems.bIGNORED = TRUE; break;
+ case IDC_GRADIENT:
+ ChangedSItems.bGRADIENT = TRUE; break;
+ case IDC_GRADIENT_LR:
+ ChangedSItems.bGRADIENT = TRUE;break;
+ case IDC_GRADIENT_RL:
+ ChangedSItems.bGRADIENT = TRUE; break;
+ case IDC_GRADIENT_BT:
+ ChangedSItems.bGRADIENT = TRUE; break;
+ case IDC_GRADIENT_TB:
+ ChangedSItems.bGRADIENT = TRUE; break;
+
+ case IDC_CORNER:
+ ChangedSItems.bCORNER = TRUE; break;
+ case IDC_CORNER_TL:
+ ChangedSItems.bCORNER = TRUE; break;
+ case IDC_CORNER_TR:
+ ChangedSItems.bCORNER = TRUE; break;
+ case IDC_CORNER_BR:
+ ChangedSItems.bCORNER = TRUE; break;
+ case IDC_CORNER_BL:
+ ChangedSItems.bCORNER = TRUE; break;
+
+ case IDC_BASECOLOUR:
+ ChangedSItems.bCOLOR = TRUE; break;
+ case IDC_BASECOLOUR2:
+ ChangedSItems.bCOLOR2 = TRUE; break;
+ case IDC_COLOR2_TRANSPARENT:
+ ChangedSItems.bCOLOR2_TRANSPARENT = TRUE; break;
+ case IDC_TEXTCOLOUR:
+ ChangedSItems.bTEXTCOLOR = TRUE; break;
+
+ case IDC_ALPHA:
+ ChangedSItems.bALPHA = TRUE; break;
+ case IDC_ALPHASPIN:
+ ChangedSItems.bALPHA = TRUE; break;
+
+ case IDC_MRGN_LEFT:
+ ChangedSItems.bMARGIN_LEFT = TRUE; break;
+ case IDC_MRGN_LEFT_SPIN:
+ ChangedSItems.bMARGIN_LEFT = TRUE; break;
+
+ case IDC_MRGN_TOP:
+ ChangedSItems.bMARGIN_TOP = TRUE; break;
+ case IDC_MRGN_TOP_SPIN:
+ ChangedSItems.bMARGIN_TOP = TRUE; break;
+
+ case IDC_MRGN_RIGHT:
+ ChangedSItems.bMARGIN_RIGHT = TRUE; break;
+ case IDC_MRGN_RIGHT_SPIN:
+ ChangedSItems.bMARGIN_RIGHT = TRUE; break;
+
+ case IDC_MRGN_BOTTOM:
+ ChangedSItems.bMARGIN_BOTTOM = TRUE; break;
+ case IDC_MRGN_BOTTOM_SPIN:
+ ChangedSItems.bMARGIN_BOTTOM = TRUE; break;
+
+ case IDC_BORDERTYPE:
+ ChangedSItems.bBORDERSTYLE = TRUE; break;
+ }
+ }
}
static BOOL isValidItem(void)
{
- if (StatusItems[LastModifiedItem].statusID == ID_EXTBKSEPARATOR)
- return FALSE;
+ if (StatusItems[LastModifiedItem].statusID == ID_EXTBKSEPARATOR)
+ return FALSE;
- return TRUE;
+ return TRUE;
}
// updates the struct with the changed dlg item
static void UpdateStatusStructSettingsFromOptDlg(HWND hwndDlg, int index)
{
- char buf[15];
- ULONG bdrtype;
-
- if (ChangedSItems.bIGNORED)
- StatusItems[index]. IGNORED = IsDlgButtonChecked(hwndDlg, IDC_IGNORE);
-
- if (ChangedSItems.bGRADIENT) {
- StatusItems[index]. GRADIENT = GRADIENT_NONE;
- if (IsDlgButtonChecked(hwndDlg, IDC_GRADIENT))
- StatusItems[index].GRADIENT |= GRADIENT_ACTIVE;
- if (IsDlgButtonChecked(hwndDlg, IDC_GRADIENT_LR))
- StatusItems[index].GRADIENT |= GRADIENT_LR;
- if (IsDlgButtonChecked(hwndDlg, IDC_GRADIENT_RL))
- StatusItems[index].GRADIENT |= GRADIENT_RL;
- if (IsDlgButtonChecked(hwndDlg, IDC_GRADIENT_TB))
- StatusItems[index].GRADIENT |= GRADIENT_TB;
- if (IsDlgButtonChecked(hwndDlg, IDC_GRADIENT_BT))
- StatusItems[index].GRADIENT |= GRADIENT_BT;
- }
- if (ChangedSItems.bCORNER) {
- StatusItems[index]. CORNER = CORNER_NONE;
- if (IsDlgButtonChecked(hwndDlg, IDC_CORNER))
- StatusItems[index].CORNER |= CORNER_ACTIVE ;
- if (IsDlgButtonChecked(hwndDlg, IDC_CORNER_TL))
- StatusItems[index].CORNER |= CORNER_TL ;
- if (IsDlgButtonChecked(hwndDlg, IDC_CORNER_TR))
- StatusItems[index].CORNER |= CORNER_TR;
- if (IsDlgButtonChecked(hwndDlg, IDC_CORNER_BR))
- StatusItems[index].CORNER |= CORNER_BR;
- if (IsDlgButtonChecked(hwndDlg, IDC_CORNER_BL))
- StatusItems[index].CORNER |= CORNER_BL;
- }
-
- if (ChangedSItems.bCOLOR)
- StatusItems[index]. COLOR = SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR, CPM_GETCOLOUR, 0, 0);
-
- if (ChangedSItems.bCOLOR2)
- StatusItems[index]. COLOR2 = SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR2, CPM_GETCOLOUR, 0, 0);
-
- if (ChangedSItems.bCOLOR2_TRANSPARENT)
- StatusItems[index]. COLOR2_TRANSPARENT = IsDlgButtonChecked(hwndDlg, IDC_COLOR2_TRANSPARENT);
-
- if (ChangedSItems.bTEXTCOLOR)
- StatusItems[index]. TEXTCOLOR = SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOUR, CPM_GETCOLOUR, 0, 0);
-
- if (ChangedSItems.bALPHA) {
- GetWindowTextA(GetDlgItem(hwndDlg, IDC_ALPHA), buf, 10); // can be removed now
- if (lstrlenA(buf) > 0)
- StatusItems[index]. ALPHA = (BYTE) SendDlgItemMessage(hwndDlg, IDC_ALPHASPIN, UDM_GETPOS, 0, 0);
- }
-
- if (ChangedSItems.bMARGIN_LEFT) {
- GetWindowTextA(GetDlgItem(hwndDlg, IDC_MRGN_LEFT), buf, 10);
- if (lstrlenA(buf) > 0)
- StatusItems[index]. MARGIN_LEFT = (BYTE) SendDlgItemMessage(hwndDlg, IDC_MRGN_LEFT_SPIN, UDM_GETPOS, 0, 0);
- }
-
- if (ChangedSItems.bMARGIN_TOP) {
- GetWindowTextA(GetDlgItem(hwndDlg, IDC_MRGN_TOP), buf, 10);
- if (lstrlenA(buf) > 0)
- StatusItems[index]. MARGIN_TOP = (BYTE) SendDlgItemMessage(hwndDlg, IDC_MRGN_TOP_SPIN, UDM_GETPOS, 0, 0);
- }
-
- if (ChangedSItems.bMARGIN_RIGHT) {
- GetWindowTextA(GetDlgItem(hwndDlg, IDC_MRGN_RIGHT), buf, 10);
- if (lstrlenA(buf) > 0)
- StatusItems[index]. MARGIN_RIGHT = (BYTE) SendDlgItemMessage(hwndDlg, IDC_MRGN_RIGHT_SPIN, UDM_GETPOS, 0, 0);
- }
-
- if (ChangedSItems.bMARGIN_BOTTOM) {
- GetWindowTextA(GetDlgItem(hwndDlg, IDC_MRGN_BOTTOM), buf, 10);
- if (lstrlenA(buf) > 0)
- StatusItems[index]. MARGIN_BOTTOM = (BYTE) SendDlgItemMessage(hwndDlg, IDC_MRGN_BOTTOM_SPIN, UDM_GETPOS, 0, 0);
- }
- if (ChangedSItems.bBORDERSTYLE) {
- bdrtype = SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_GETCURSEL, 0, 0);
- if(bdrtype == CB_ERR)
- StatusItems[index].BORDERSTYLE = 0;
- else {
- switch(bdrtype) {
- case 0:
- StatusItems[index].BORDERSTYLE = 0;
- break;
- case 1:
- StatusItems[index].BORDERSTYLE = BDR_RAISEDOUTER;
- break;
- case 2:
- StatusItems[index].BORDERSTYLE = BDR_SUNKENINNER;
- break;
- case 3:
- StatusItems[index].BORDERSTYLE = EDGE_BUMP;
- break;
- case 4:
- StatusItems[index].BORDERSTYLE = EDGE_ETCHED;
- break;
- default:
- StatusItems[index].BORDERSTYLE = 0;
- break;
- }
- }
- }
+ char buf[15];
+ ULONG bdrtype;
+
+ if (ChangedSItems.bIGNORED)
+ StatusItems[index]. IGNORED = IsDlgButtonChecked(hwndDlg, IDC_IGNORE);
+
+ if (ChangedSItems.bGRADIENT) {
+ StatusItems[index]. GRADIENT = GRADIENT_NONE;
+ if (IsDlgButtonChecked(hwndDlg, IDC_GRADIENT))
+ StatusItems[index].GRADIENT |= GRADIENT_ACTIVE;
+ if (IsDlgButtonChecked(hwndDlg, IDC_GRADIENT_LR))
+ StatusItems[index].GRADIENT |= GRADIENT_LR;
+ if (IsDlgButtonChecked(hwndDlg, IDC_GRADIENT_RL))
+ StatusItems[index].GRADIENT |= GRADIENT_RL;
+ if (IsDlgButtonChecked(hwndDlg, IDC_GRADIENT_TB))
+ StatusItems[index].GRADIENT |= GRADIENT_TB;
+ if (IsDlgButtonChecked(hwndDlg, IDC_GRADIENT_BT))
+ StatusItems[index].GRADIENT |= GRADIENT_BT;
+ }
+ if (ChangedSItems.bCORNER) {
+ StatusItems[index]. CORNER = CORNER_NONE;
+ if (IsDlgButtonChecked(hwndDlg, IDC_CORNER))
+ StatusItems[index].CORNER |= CORNER_ACTIVE ;
+ if (IsDlgButtonChecked(hwndDlg, IDC_CORNER_TL))
+ StatusItems[index].CORNER |= CORNER_TL ;
+ if (IsDlgButtonChecked(hwndDlg, IDC_CORNER_TR))
+ StatusItems[index].CORNER |= CORNER_TR;
+ if (IsDlgButtonChecked(hwndDlg, IDC_CORNER_BR))
+ StatusItems[index].CORNER |= CORNER_BR;
+ if (IsDlgButtonChecked(hwndDlg, IDC_CORNER_BL))
+ StatusItems[index].CORNER |= CORNER_BL;
+ }
+
+ if (ChangedSItems.bCOLOR)
+ StatusItems[index]. COLOR = SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR, CPM_GETCOLOUR, 0, 0);
+
+ if (ChangedSItems.bCOLOR2)
+ StatusItems[index]. COLOR2 = SendDlgItemMessage(hwndDlg, IDC_BASECOLOUR2, CPM_GETCOLOUR, 0, 0);
+
+ if (ChangedSItems.bCOLOR2_TRANSPARENT)
+ StatusItems[index]. COLOR2_TRANSPARENT = IsDlgButtonChecked(hwndDlg, IDC_COLOR2_TRANSPARENT);
+
+ if (ChangedSItems.bTEXTCOLOR)
+ StatusItems[index]. TEXTCOLOR = SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOUR, CPM_GETCOLOUR, 0, 0);
+
+ if (ChangedSItems.bALPHA) {
+ GetWindowTextA(GetDlgItem(hwndDlg, IDC_ALPHA), buf, 10); // can be removed now
+ if (lstrlenA(buf) > 0)
+ StatusItems[index]. ALPHA = (BYTE) SendDlgItemMessage(hwndDlg, IDC_ALPHASPIN, UDM_GETPOS, 0, 0);
+ }
+
+ if (ChangedSItems.bMARGIN_LEFT) {
+ GetWindowTextA(GetDlgItem(hwndDlg, IDC_MRGN_LEFT), buf, 10);
+ if (lstrlenA(buf) > 0)
+ StatusItems[index]. MARGIN_LEFT = (BYTE) SendDlgItemMessage(hwndDlg, IDC_MRGN_LEFT_SPIN, UDM_GETPOS, 0, 0);
+ }
+
+ if (ChangedSItems.bMARGIN_TOP) {
+ GetWindowTextA(GetDlgItem(hwndDlg, IDC_MRGN_TOP), buf, 10);
+ if (lstrlenA(buf) > 0)
+ StatusItems[index]. MARGIN_TOP = (BYTE) SendDlgItemMessage(hwndDlg, IDC_MRGN_TOP_SPIN, UDM_GETPOS, 0, 0);
+ }
+
+ if (ChangedSItems.bMARGIN_RIGHT) {
+ GetWindowTextA(GetDlgItem(hwndDlg, IDC_MRGN_RIGHT), buf, 10);
+ if (lstrlenA(buf) > 0)
+ StatusItems[index]. MARGIN_RIGHT = (BYTE) SendDlgItemMessage(hwndDlg, IDC_MRGN_RIGHT_SPIN, UDM_GETPOS, 0, 0);
+ }
+
+ if (ChangedSItems.bMARGIN_BOTTOM) {
+ GetWindowTextA(GetDlgItem(hwndDlg, IDC_MRGN_BOTTOM), buf, 10);
+ if (lstrlenA(buf) > 0)
+ StatusItems[index]. MARGIN_BOTTOM = (BYTE) SendDlgItemMessage(hwndDlg, IDC_MRGN_BOTTOM_SPIN, UDM_GETPOS, 0, 0);
+ }
+ if (ChangedSItems.bBORDERSTYLE) {
+ bdrtype = SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_GETCURSEL, 0, 0);
+ if(bdrtype == CB_ERR)
+ StatusItems[index].BORDERSTYLE = 0;
+ else {
+ switch(bdrtype) {
+ case 0:
+ StatusItems[index].BORDERSTYLE = 0;
+ break;
+ case 1:
+ StatusItems[index].BORDERSTYLE = BDR_RAISEDOUTER;
+ break;
+ case 2:
+ StatusItems[index].BORDERSTYLE = BDR_SUNKENINNER;
+ break;
+ case 3:
+ StatusItems[index].BORDERSTYLE = EDGE_BUMP;
+ break;
+ case 4:
+ StatusItems[index].BORDERSTYLE = EDGE_ETCHED;
+ break;
+ default:
+ StatusItems[index].BORDERSTYLE = 0;
+ break;
+ }
+ }
+ }
}
static void SaveLatestChanges(HWND hwndDlg)
{
- int n, itemData;
- // process old selection
- if (last_selcount > 0) {
- for (n = 0; n < last_selcount; n++) {
- itemData = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETITEMDATA, last_indizes[n], 0);
- if (itemData != ID_EXTBKSEPARATOR) {
- UpdateStatusStructSettingsFromOptDlg(hwndDlg, itemData - ID_EXTBK_FIRST);
- }
- }
- }
-
- // reset bChange
- ChangedSItems.bALPHA = FALSE;
- ChangedSItems.bGRADIENT = FALSE;
- ChangedSItems.bCORNER = FALSE;
- ChangedSItems.bCOLOR = FALSE;
- ChangedSItems.bCOLOR2 = FALSE;
- ChangedSItems.bCOLOR2_TRANSPARENT = FALSE;
- ChangedSItems.bTEXTCOLOR = FALSE;
- ChangedSItems.bALPHA = FALSE;
- ChangedSItems.bMARGIN_LEFT = FALSE;
- ChangedSItems.bMARGIN_TOP = FALSE;
- ChangedSItems.bMARGIN_RIGHT = FALSE;
- ChangedSItems.bMARGIN_BOTTOM = FALSE;
- ChangedSItems.bIGNORED = FALSE;
- ChangedSItems.bBORDERSTYLE = FALSE;
+ int n, itemData;
+ // process old selection
+ if (last_selcount > 0) {
+ for (n = 0; n < last_selcount; n++) {
+ itemData = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETITEMDATA, last_indizes[n], 0);
+ if (itemData != ID_EXTBKSEPARATOR) {
+ UpdateStatusStructSettingsFromOptDlg(hwndDlg, itemData - ID_EXTBK_FIRST);
+ }
+ }
+ }
+
+ // reset bChange
+ ChangedSItems.bALPHA = FALSE;
+ ChangedSItems.bGRADIENT = FALSE;
+ ChangedSItems.bCORNER = FALSE;
+ ChangedSItems.bCOLOR = FALSE;
+ ChangedSItems.bCOLOR2 = FALSE;
+ ChangedSItems.bCOLOR2_TRANSPARENT = FALSE;
+ ChangedSItems.bTEXTCOLOR = FALSE;
+ ChangedSItems.bALPHA = FALSE;
+ ChangedSItems.bMARGIN_LEFT = FALSE;
+ ChangedSItems.bMARGIN_TOP = FALSE;
+ ChangedSItems.bMARGIN_RIGHT = FALSE;
+ ChangedSItems.bMARGIN_BOTTOM = FALSE;
+ ChangedSItems.bIGNORED = FALSE;
+ ChangedSItems.bBORDERSTYLE = FALSE;
}
static UINT _controls_to_refresh[] = {
- IDC_BORDERTYPE,
- IDC_3DDARKCOLOR,
- IDC_3DLIGHTCOLOR,
- IDC_MRGN_BOTTOM,
- IDC_MRGN_LEFT,
- IDC_ALPHASPIN,
- IDC_CORNER,
- IDC_MRGN_TOP_SPIN,
- IDC_MRGN_RIGHT_SPIN,
- IDC_MRGN_BOTTOM_SPIN,
- IDC_MRGN_LEFT_SPIN,
- IDC_GRADIENT,
- IDC_GRADIENT_LR,
- IDC_GRADIENT_RL,
- IDC_GRADIENT_TB,
- IDC_BASECOLOUR,
- IDC_ALPHA,
- IDC_MRGN_TOP,
- IDC_MRGN_RIGHT,
- IDC_GRADIENT_BT,
- IDC_BASECOLOUR2,
- IDC_TEXTCOLOUR,
- IDC_CORNER_TL,
- IDC_CORNER_TR,
- IDC_CORNER_BR,
- IDC_CORNER_BL,
- IDC_IGNORE,
- IDC_ALPHALABLE,
- IDC_COLOR2LABLE,
- IDC_COLORLABLE,
- IDC_TEXTCOLOURLABLE,
- IDC_COLOR2_TRANSPARENT,
- 0
+ IDC_BORDERTYPE,
+ IDC_3DDARKCOLOR,
+ IDC_3DLIGHTCOLOR,
+ IDC_MRGN_BOTTOM,
+ IDC_MRGN_LEFT,
+ IDC_ALPHASPIN,
+ IDC_CORNER,
+ IDC_MRGN_TOP_SPIN,
+ IDC_MRGN_RIGHT_SPIN,
+ IDC_MRGN_BOTTOM_SPIN,
+ IDC_MRGN_LEFT_SPIN,
+ IDC_GRADIENT,
+ IDC_GRADIENT_LR,
+ IDC_GRADIENT_RL,
+ IDC_GRADIENT_TB,
+ IDC_BASECOLOUR,
+ IDC_ALPHA,
+ IDC_MRGN_TOP,
+ IDC_MRGN_RIGHT,
+ IDC_GRADIENT_BT,
+ IDC_BASECOLOUR2,
+ IDC_TEXTCOLOUR,
+ IDC_CORNER_TL,
+ IDC_CORNER_TR,
+ IDC_CORNER_BR,
+ IDC_CORNER_BL,
+ IDC_IGNORE,
+ IDC_ALPHALABLE,
+ IDC_COLOR2LABLE,
+ IDC_COLORLABLE,
+ IDC_TEXTCOLOURLABLE,
+ IDC_COLOR2_TRANSPARENT,
+ 0
};
static void RefreshControls(HWND hwnd)
{
- for(int i = 0; _controls_to_refresh[i]; i++)
- InvalidateRect(GetDlgItem(hwnd, _controls_to_refresh[i]), NULL, FALSE);
+ for(int i = 0; _controls_to_refresh[i]; i++)
+ InvalidateRect(GetDlgItem(hwnd, _controls_to_refresh[i]), NULL, FALSE);
}
// wenn die listbox geдndert wurde
static void OnListItemsChange(HWND hwndDlg)
{
- SendMessage(hwndDlg, WM_SETREDRAW, FALSE, 0);
- SaveLatestChanges(hwndDlg);
-
- // set new selection
- last_selcount = SendMessage(GetDlgItem(hwndDlg, IDC_ITEMS), LB_GETSELCOUNT, 0, 0);
- if (last_selcount > 0) {
- int n, real_index, itemData, first_item;
- StatusItems_t DialogSettingForMultiSel;
-
- // get selected indizes
- SendMessage(GetDlgItem(hwndDlg, IDC_ITEMS), LB_GETSELITEMS, 64, (LPARAM) last_indizes);
-
- // initialize with first items value
-
- first_item = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETITEMDATA, last_indizes[0], 0) - ID_EXTBK_FIRST;
- DialogSettingForMultiSel = StatusItems[first_item];
- for (n = 0; n < last_selcount; n++) {
- itemData = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETITEMDATA, last_indizes[n], 0);
- if (itemData != ID_EXTBKSEPARATOR) {
- real_index = itemData - ID_EXTBK_FIRST;
- if (StatusItems[real_index].ALPHA != StatusItems[first_item].ALPHA)
- DialogSettingForMultiSel.ALPHA = -1;
- if (StatusItems[real_index].COLOR != StatusItems[first_item].COLOR)
- DialogSettingForMultiSel.COLOR = CLCDEFAULT_COLOR;
- if (StatusItems[real_index].COLOR2 != StatusItems[first_item].COLOR2)
- DialogSettingForMultiSel.COLOR2 = CLCDEFAULT_COLOR2;
- if (StatusItems[real_index].COLOR2_TRANSPARENT != StatusItems[first_item].COLOR2_TRANSPARENT)
- DialogSettingForMultiSel.COLOR2_TRANSPARENT = CLCDEFAULT_COLOR2_TRANSPARENT;
- if (StatusItems[real_index].TEXTCOLOR != StatusItems[first_item].TEXTCOLOR)
- DialogSettingForMultiSel.TEXTCOLOR = CLCDEFAULT_TEXTCOLOR;
- if (StatusItems[real_index].CORNER != StatusItems[first_item].CORNER)
- DialogSettingForMultiSel.CORNER = CLCDEFAULT_CORNER;
- if (StatusItems[real_index].GRADIENT != StatusItems[first_item].GRADIENT)
- DialogSettingForMultiSel.GRADIENT = CLCDEFAULT_GRADIENT;
- if (StatusItems[real_index].IGNORED != StatusItems[first_item].IGNORED)
- DialogSettingForMultiSel.IGNORED = CLCDEFAULT_IGNORE;
- if (StatusItems[real_index].MARGIN_BOTTOM != StatusItems[first_item].MARGIN_BOTTOM)
- DialogSettingForMultiSel.MARGIN_BOTTOM = -1;
- if (StatusItems[real_index].MARGIN_LEFT != StatusItems[first_item].MARGIN_LEFT)
- DialogSettingForMultiSel.MARGIN_LEFT = -1;
- if (StatusItems[real_index].MARGIN_RIGHT != StatusItems[first_item].MARGIN_RIGHT)
- DialogSettingForMultiSel.MARGIN_RIGHT = -1;
- if (StatusItems[real_index].MARGIN_TOP != StatusItems[first_item].MARGIN_TOP)
- DialogSettingForMultiSel.MARGIN_TOP = -1;
- if (StatusItems[real_index].BORDERSTYLE != StatusItems[first_item].BORDERSTYLE)
- DialogSettingForMultiSel.BORDERSTYLE = -1;
- }
- }
-
- if (last_selcount == 1 && StatusItems[first_item].statusID == ID_EXTBKSEPARATOR) {
- ChangeControlItems(hwndDlg, 0, 0);
- last_selcount = 0;
- } else
- ChangeControlItems(hwndDlg, 1, 0);
- FillOptionDialogByStatusItem(hwndDlg, &DialogSettingForMultiSel);
- InvalidateRect(GetDlgItem(hwndDlg, IDC_ITEMS), NULL, FALSE);
- }
- SendMessage(hwndDlg, WM_SETREDRAW, TRUE, 0);
- RefreshControls(hwndDlg);
+ SendMessage(hwndDlg, WM_SETREDRAW, FALSE, 0);
+ SaveLatestChanges(hwndDlg);
+
+ // set new selection
+ last_selcount = SendMessage(GetDlgItem(hwndDlg, IDC_ITEMS), LB_GETSELCOUNT, 0, 0);
+ if (last_selcount > 0) {
+ int n, real_index, itemData, first_item;
+ StatusItems_t DialogSettingForMultiSel;
+
+ // get selected indizes
+ SendMessage(GetDlgItem(hwndDlg, IDC_ITEMS), LB_GETSELITEMS, 64, (LPARAM) last_indizes);
+
+ // initialize with first items value
+
+ first_item = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETITEMDATA, last_indizes[0], 0) - ID_EXTBK_FIRST;
+ DialogSettingForMultiSel = StatusItems[first_item];
+ for (n = 0; n < last_selcount; n++) {
+ itemData = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETITEMDATA, last_indizes[n], 0);
+ if (itemData != ID_EXTBKSEPARATOR) {
+ real_index = itemData - ID_EXTBK_FIRST;
+ if (StatusItems[real_index].ALPHA != StatusItems[first_item].ALPHA)
+ DialogSettingForMultiSel.ALPHA = -1;
+ if (StatusItems[real_index].COLOR != StatusItems[first_item].COLOR)
+ DialogSettingForMultiSel.COLOR = CLCDEFAULT_COLOR;
+ if (StatusItems[real_index].COLOR2 != StatusItems[first_item].COLOR2)
+ DialogSettingForMultiSel.COLOR2 = CLCDEFAULT_COLOR2;
+ if (StatusItems[real_index].COLOR2_TRANSPARENT != StatusItems[first_item].COLOR2_TRANSPARENT)
+ DialogSettingForMultiSel.COLOR2_TRANSPARENT = CLCDEFAULT_COLOR2_TRANSPARENT;
+ if (StatusItems[real_index].TEXTCOLOR != StatusItems[first_item].TEXTCOLOR)
+ DialogSettingForMultiSel.TEXTCOLOR = CLCDEFAULT_TEXTCOLOR;
+ if (StatusItems[real_index].CORNER != StatusItems[first_item].CORNER)
+ DialogSettingForMultiSel.CORNER = CLCDEFAULT_CORNER;
+ if (StatusItems[real_index].GRADIENT != StatusItems[first_item].GRADIENT)
+ DialogSettingForMultiSel.GRADIENT = CLCDEFAULT_GRADIENT;
+ if (StatusItems[real_index].IGNORED != StatusItems[first_item].IGNORED)
+ DialogSettingForMultiSel.IGNORED = CLCDEFAULT_IGNORE;
+ if (StatusItems[real_index].MARGIN_BOTTOM != StatusItems[first_item].MARGIN_BOTTOM)
+ DialogSettingForMultiSel.MARGIN_BOTTOM = -1;
+ if (StatusItems[real_index].MARGIN_LEFT != StatusItems[first_item].MARGIN_LEFT)
+ DialogSettingForMultiSel.MARGIN_LEFT = -1;
+ if (StatusItems[real_index].MARGIN_RIGHT != StatusItems[first_item].MARGIN_RIGHT)
+ DialogSettingForMultiSel.MARGIN_RIGHT = -1;
+ if (StatusItems[real_index].MARGIN_TOP != StatusItems[first_item].MARGIN_TOP)
+ DialogSettingForMultiSel.MARGIN_TOP = -1;
+ if (StatusItems[real_index].BORDERSTYLE != StatusItems[first_item].BORDERSTYLE)
+ DialogSettingForMultiSel.BORDERSTYLE = -1;
+ }
+ }
+
+ if (last_selcount == 1 && StatusItems[first_item].statusID == ID_EXTBKSEPARATOR) {
+ ChangeControlItems(hwndDlg, 0, 0);
+ last_selcount = 0;
+ } else
+ ChangeControlItems(hwndDlg, 1, 0);
+ FillOptionDialogByStatusItem(hwndDlg, &DialogSettingForMultiSel);
+ InvalidateRect(GetDlgItem(hwndDlg, IDC_ITEMS), NULL, FALSE);
+ }
+ SendMessage(hwndDlg, WM_SETREDRAW, TRUE, 0);
+ RefreshControls(hwndDlg);
}
// fills the combobox of the options dlg for the first time
@@ -637,35 +636,35 @@ static void FillItemList(HWND hwndDlg) static INT_PTR CALLBACK SkinEdit_ExtBkDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- SKINDESCRIPTION *psd = (SKINDESCRIPTION *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
- if(psd) {
- ID_EXTBK_FIRST = psd->firstItem;
- ID_EXTBK_LAST = psd->lastItem;
- StatusItems = psd->StatusItems;
- }
- switch (msg) {
- case WM_INITDIALOG:
- psd = (SKINDESCRIPTION *)malloc(sizeof(SKINDESCRIPTION));
- ZeroMemory(psd, sizeof(SKINDESCRIPTION));
- CopyMemory(psd, (void *)lParam, sizeof(SKINDESCRIPTION));
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)psd);
-
- if(psd) {
- ID_EXTBK_FIRST = psd->firstItem;
- ID_EXTBK_LAST = psd->lastItem;
- StatusItems = psd->StatusItems;
- }
-
- TranslateDialogDefault(hwndDlg);
- FillItemList(hwndDlg);
- SendMessage(hwndDlg, WM_USER + 101, 0, 0);
-
- psd->hMenuItems = CreatePopupMenu();
- AppendMenu(psd->hMenuItems, MF_STRING | MF_DISABLED, (UINT_PTR)0, LPGENT("Copy from"));
- AppendMenuA(psd->hMenuItems, MF_SEPARATOR, (UINT_PTR)0, NULL);
-
- {
+ SKINDESCRIPTION *psd = (SKINDESCRIPTION *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+
+ if(psd) {
+ ID_EXTBK_FIRST = psd->firstItem;
+ ID_EXTBK_LAST = psd->lastItem;
+ StatusItems = psd->StatusItems;
+ }
+ switch (msg) {
+ case WM_INITDIALOG:
+ psd = (SKINDESCRIPTION *)malloc(sizeof(SKINDESCRIPTION));
+ ZeroMemory(psd, sizeof(SKINDESCRIPTION));
+ CopyMemory(psd, (void *)lParam, sizeof(SKINDESCRIPTION));
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)psd);
+
+ if(psd) {
+ ID_EXTBK_FIRST = psd->firstItem;
+ ID_EXTBK_LAST = psd->lastItem;
+ StatusItems = psd->StatusItems;
+ }
+
+ TranslateDialogDefault(hwndDlg);
+ FillItemList(hwndDlg);
+ SendMessage(hwndDlg, WM_USER + 101, 0, 0);
+
+ psd->hMenuItems = CreatePopupMenu();
+ AppendMenu(psd->hMenuItems, MF_STRING | MF_DISABLED, (UINT_PTR)0, LPGENT("Copy from"));
+ AppendMenuA(psd->hMenuItems, MF_SEPARATOR, (UINT_PTR)0, NULL);
+
+ {
int i;
for(i = ID_EXTBK_FIRST; i <= ID_EXTBK_LAST; i++) {
@@ -675,245 +674,245 @@ static INT_PTR CALLBACK SkinEdit_ExtBkDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa AppendMenuA(psd->hMenuItems, MF_STRING, (UINT_PTR)i, &StatusItems[i - ID_EXTBK_FIRST].szName[iOff]);
}
}
- return TRUE;
- case WM_USER + 101:
- {
- DBVARIANT dbv = {0};
-
- SendDlgItemMessage(hwndDlg, IDC_MRGN_LEFT_SPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
- SendDlgItemMessage(hwndDlg, IDC_MRGN_TOP_SPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
- SendDlgItemMessage(hwndDlg, IDC_MRGN_RIGHT_SPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
- SendDlgItemMessage(hwndDlg, IDC_MRGN_BOTTOM_SPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
- SendDlgItemMessage(hwndDlg, IDC_ALPHASPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
-
- SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("<None>"));
- SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Raised"));
- SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Sunken"));
- SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Bumped"));
- SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Etched"));
-
- SendDlgItemMessage(hwndDlg, IDC_3DDARKCOLOR, CPM_SETCOLOUR, 0, DBGetContactSettingDword(NULL, "CLCExt", "3ddark", RGB(224,224,224)));
- SendDlgItemMessage(hwndDlg, IDC_3DLIGHTCOLOR, CPM_SETCOLOUR, 0, DBGetContactSettingDword(NULL, "CLCExt", "3dbright", RGB(224,224,224)));
- return 0;
- }
-
- case WM_DRAWITEM:
- {
- DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *) lParam;
- int iItem = dis->itemData;
- StatusItems_t *item = 0;
-
- SetBkMode(dis->hDC, TRANSPARENT);
- FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_WINDOW));
-
- if(iItem >= ID_EXTBK_FIRST && iItem <= ID_EXTBK_LAST)
- item = &StatusItems[iItem - ID_EXTBK_FIRST];
-
- if (dis->itemState & ODS_SELECTED && iItem != ID_EXTBKSEPARATOR) {
- FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_HIGHLIGHT));
- SetTextColor(dis->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
- }
- else {
- FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_WINDOW));
- if(item && item->IGNORED)
- SetTextColor(dis->hDC, RGB(255, 0, 0));
- else
- SetTextColor(dis->hDC, GetSysColor(COLOR_WINDOWTEXT));
- }
- if(iItem == ID_EXTBKSEPARATOR) {
- HPEN hPen, hPenOld;
- POINT pt;
-
- hPen = CreatePen(PS_SOLID, 2, GetSysColor(COLOR_WINDOWTEXT));
- hPenOld = (HPEN)SelectObject(dis->hDC, hPen);
-
- MoveToEx(dis->hDC, dis->rcItem.left, (dis->rcItem.top + dis->rcItem.bottom) / 2, &pt);
- LineTo(dis->hDC, dis->rcItem.right, (dis->rcItem.top + dis->rcItem.bottom) / 2);
- SelectObject(dis->hDC, hPenOld);
- DeleteObject((HGDIOBJ)hPen);
- }
- else if(dis->itemID >= 0 && item) {
- char *szName = item->szName[0] == '{' ? &item->szName[3] : item->szName;
-
- TextOutA(dis->hDC, dis->rcItem.left, dis->rcItem.top, szName, lstrlenA(szName));
- }
- return TRUE;
- }
-
- case WM_CONTEXTMENU:
- {
- POINT pt;
- RECT rc;
- HWND hwndList = GetDlgItem(hwndDlg, IDC_ITEMS);
-
- GetCursorPos(&pt);
- GetWindowRect(hwndList, &rc);
- if(PtInRect(&rc, pt)) {
- int iSelection = (int)TrackPopupMenu(psd->hMenuItems, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
-
- if(iSelection >= ID_EXTBK_FIRST && iSelection <= ID_EXTBK_LAST) {
- iSelection -= ID_EXTBK_FIRST;
-
- for(int i = ID_EXTBK_FIRST; i <= ID_EXTBK_LAST; i++) {
- if(SendMessage(hwndList, LB_GETSEL, i - ID_EXTBK_FIRST, 0) > 0) {
- int iIndex = SendMessage(hwndList, LB_GETITEMDATA, i - ID_EXTBK_FIRST, 0);
- iIndex -= ID_EXTBK_FIRST;
-
- if(iIndex >= 0) {
- StatusItems[iIndex].ALPHA = StatusItems[iSelection].ALPHA;
- StatusItems[iIndex].BORDERSTYLE = StatusItems[iSelection].BORDERSTYLE;
- StatusItems[iIndex].COLOR = StatusItems[iSelection].COLOR;
- StatusItems[iIndex].COLOR2 = StatusItems[iSelection].COLOR2;
- StatusItems[iIndex].COLOR2_TRANSPARENT = StatusItems[iSelection].COLOR2_TRANSPARENT;
- StatusItems[iIndex].CORNER = StatusItems[iSelection].CORNER;
- StatusItems[iIndex].GRADIENT = StatusItems[iSelection].GRADIENT;
- StatusItems[iIndex].IGNORED = StatusItems[iSelection].IGNORED;
- StatusItems[iIndex].imageItem = StatusItems[iSelection].imageItem;
- StatusItems[iIndex].MARGIN_BOTTOM = StatusItems[iSelection].MARGIN_BOTTOM;
- StatusItems[iIndex].MARGIN_LEFT = StatusItems[iSelection].MARGIN_LEFT;
- StatusItems[iIndex].MARGIN_RIGHT = StatusItems[iSelection].MARGIN_RIGHT;
- StatusItems[iIndex].MARGIN_TOP = StatusItems[iSelection].MARGIN_TOP;
- StatusItems[iIndex].TEXTCOLOR = StatusItems[iSelection].TEXTCOLOR;
- }
- }
- }
- OnListItemsChange(hwndDlg);
- }
- }
- break;
- }
- case WM_COMMAND:
- // this will check if the user changed some actual statusitems values
- // if yes the flag bChanged will be set to TRUE
- SetChangedStatusItemFlag(wParam, hwndDlg);
- switch(LOWORD(wParam)) {
- case IDC_ITEMS:
- if (HIWORD(wParam) != LBN_SELCHANGE)
- return FALSE;
- {
- int iItem = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETCURSEL, 0, 0), 0);
- if(iItem == ID_EXTBKSEPARATOR)
- return FALSE;
- }
- OnListItemsChange(hwndDlg);
+ return TRUE;
+ case WM_USER + 101:
+ {
+ DBVARIANT dbv = {0};
+
+ SendDlgItemMessage(hwndDlg, IDC_MRGN_LEFT_SPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
+ SendDlgItemMessage(hwndDlg, IDC_MRGN_TOP_SPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
+ SendDlgItemMessage(hwndDlg, IDC_MRGN_RIGHT_SPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
+ SendDlgItemMessage(hwndDlg, IDC_MRGN_BOTTOM_SPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
+ SendDlgItemMessage(hwndDlg, IDC_ALPHASPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
+
+ SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("<None>"));
+ SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Raised"));
+ SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Sunken"));
+ SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Bumped"));
+ SendDlgItemMessage(hwndDlg, IDC_BORDERTYPE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Etched"));
+
+ SendDlgItemMessage(hwndDlg, IDC_3DDARKCOLOR, CPM_SETCOLOUR, 0, DBGetContactSettingDword(NULL, "CLCExt", "3ddark", RGB(224,224,224)));
+ SendDlgItemMessage(hwndDlg, IDC_3DLIGHTCOLOR, CPM_SETCOLOUR, 0, DBGetContactSettingDword(NULL, "CLCExt", "3dbright", RGB(224,224,224)));
+ return 0;
+ }
+
+ case WM_DRAWITEM:
+ {
+ DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *) lParam;
+ int iItem = dis->itemData;
+ StatusItems_t *item = 0;
+
+ SetBkMode(dis->hDC, TRANSPARENT);
+ FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_WINDOW));
+
+ if(iItem >= ID_EXTBK_FIRST && iItem <= ID_EXTBK_LAST)
+ item = &StatusItems[iItem - ID_EXTBK_FIRST];
+
+ if (dis->itemState & ODS_SELECTED && iItem != ID_EXTBKSEPARATOR) {
+ FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_HIGHLIGHT));
+ SetTextColor(dis->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
+ }
+ else {
+ FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_WINDOW));
+ if(item && item->IGNORED)
+ SetTextColor(dis->hDC, RGB(255, 0, 0));
+ else
+ SetTextColor(dis->hDC, GetSysColor(COLOR_WINDOWTEXT));
+ }
+ if(iItem == ID_EXTBKSEPARATOR) {
+ HPEN hPen, hPenOld;
+ POINT pt;
+
+ hPen = CreatePen(PS_SOLID, 2, GetSysColor(COLOR_WINDOWTEXT));
+ hPenOld = (HPEN)SelectObject(dis->hDC, hPen);
+
+ MoveToEx(dis->hDC, dis->rcItem.left, (dis->rcItem.top + dis->rcItem.bottom) / 2, &pt);
+ LineTo(dis->hDC, dis->rcItem.right, (dis->rcItem.top + dis->rcItem.bottom) / 2);
+ SelectObject(dis->hDC, hPenOld);
+ DeleteObject((HGDIOBJ)hPen);
+ }
+ else if(dis->itemID >= 0 && item) {
+ char *szName = item->szName[0] == '{' ? &item->szName[3] : item->szName;
+
+ TextOutA(dis->hDC, dis->rcItem.left, dis->rcItem.top, szName, lstrlenA(szName));
+ }
+ return TRUE;
+ }
+
+ case WM_CONTEXTMENU:
+ {
+ POINT pt;
+ RECT rc;
+ HWND hwndList = GetDlgItem(hwndDlg, IDC_ITEMS);
+
+ GetCursorPos(&pt);
+ GetWindowRect(hwndList, &rc);
+ if(PtInRect(&rc, pt)) {
+ int iSelection = (int)TrackPopupMenu(psd->hMenuItems, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
+
+ if(iSelection >= ID_EXTBK_FIRST && iSelection <= ID_EXTBK_LAST) {
+ iSelection -= ID_EXTBK_FIRST;
+
+ for(int i = ID_EXTBK_FIRST; i <= ID_EXTBK_LAST; i++) {
+ if(SendMessage(hwndList, LB_GETSEL, i - ID_EXTBK_FIRST, 0) > 0) {
+ int iIndex = SendMessage(hwndList, LB_GETITEMDATA, i - ID_EXTBK_FIRST, 0);
+ iIndex -= ID_EXTBK_FIRST;
+
+ if(iIndex >= 0) {
+ StatusItems[iIndex].ALPHA = StatusItems[iSelection].ALPHA;
+ StatusItems[iIndex].BORDERSTYLE = StatusItems[iSelection].BORDERSTYLE;
+ StatusItems[iIndex].COLOR = StatusItems[iSelection].COLOR;
+ StatusItems[iIndex].COLOR2 = StatusItems[iSelection].COLOR2;
+ StatusItems[iIndex].COLOR2_TRANSPARENT = StatusItems[iSelection].COLOR2_TRANSPARENT;
+ StatusItems[iIndex].CORNER = StatusItems[iSelection].CORNER;
+ StatusItems[iIndex].GRADIENT = StatusItems[iSelection].GRADIENT;
+ StatusItems[iIndex].IGNORED = StatusItems[iSelection].IGNORED;
+ StatusItems[iIndex].imageItem = StatusItems[iSelection].imageItem;
+ StatusItems[iIndex].MARGIN_BOTTOM = StatusItems[iSelection].MARGIN_BOTTOM;
+ StatusItems[iIndex].MARGIN_LEFT = StatusItems[iSelection].MARGIN_LEFT;
+ StatusItems[iIndex].MARGIN_RIGHT = StatusItems[iSelection].MARGIN_RIGHT;
+ StatusItems[iIndex].MARGIN_TOP = StatusItems[iSelection].MARGIN_TOP;
+ StatusItems[iIndex].TEXTCOLOR = StatusItems[iSelection].TEXTCOLOR;
+ }
+ }
+ }
+ OnListItemsChange(hwndDlg);
+ }
+ }
+ break;
+ }
+ case WM_COMMAND:
+ // this will check if the user changed some actual statusitems values
+ // if yes the flag bChanged will be set to TRUE
+ SetChangedStatusItemFlag(wParam, hwndDlg);
+ switch(LOWORD(wParam)) {
+ case IDC_ITEMS:
+ if (HIWORD(wParam) != LBN_SELCHANGE)
+ return FALSE;
+ {
+ int iItem = SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_ITEMS, LB_GETCURSEL, 0, 0), 0);
+ if(iItem == ID_EXTBKSEPARATOR)
+ return FALSE;
+ }
+ OnListItemsChange(hwndDlg);
if(psd->pfnClcOptionsChanged)
psd->pfnClcOptionsChanged();
- break;
- case IDC_GRADIENT:
- ReActiveCombo(hwndDlg);
- break;
- case IDC_CORNER:
- ReActiveCombo(hwndDlg);
- break;
- case IDC_IGNORE:
- ReActiveCombo(hwndDlg);
- break;
- case IDC_COLOR2_TRANSPARENT:
- ReActiveCombo(hwndDlg);
- break;
- case IDC_BORDERTYPE:
- break;
- }
- if ((LOWORD(wParam) == IDC_ALPHA || LOWORD(wParam) == IDC_MRGN_LEFT || LOWORD(wParam) == IDC_MRGN_BOTTOM || LOWORD(wParam) == IDC_MRGN_TOP || LOWORD(wParam) == IDC_MRGN_RIGHT) && (HIWORD(wParam) != EN_CHANGE || (HWND) lParam != GetFocus()))
- return 0;
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case WM_NOTIFY:
- switch (((LPNMHDR) lParam)->idFrom) {
- case 0:
- switch (((LPNMHDR) lParam)->code) {
- case PSN_APPLY:
- // save user made changes
- SaveLatestChanges(hwndDlg);
- // save struct to DB
+ break;
+ case IDC_GRADIENT:
+ ReActiveCombo(hwndDlg);
+ break;
+ case IDC_CORNER:
+ ReActiveCombo(hwndDlg);
+ break;
+ case IDC_IGNORE:
+ ReActiveCombo(hwndDlg);
+ break;
+ case IDC_COLOR2_TRANSPARENT:
+ ReActiveCombo(hwndDlg);
+ break;
+ case IDC_BORDERTYPE:
+ break;
+ }
+ if ((LOWORD(wParam) == IDC_ALPHA || LOWORD(wParam) == IDC_MRGN_LEFT || LOWORD(wParam) == IDC_MRGN_BOTTOM || LOWORD(wParam) == IDC_MRGN_TOP || LOWORD(wParam) == IDC_MRGN_RIGHT) && (HIWORD(wParam) != EN_CHANGE || (HWND) lParam != GetFocus()))
+ return 0;
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+
+ case WM_NOTIFY:
+ switch (((LPNMHDR) lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR) lParam)->code) {
+ case PSN_APPLY:
+ // save user made changes
+ SaveLatestChanges(hwndDlg);
+ // save struct to DB
if(psd->pfnSaveCompleteStruct)
psd->pfnSaveCompleteStruct();
- db_set_dw(NULL, "CLCExt", "3dbright", SendDlgItemMessage(hwndDlg, IDC_3DLIGHTCOLOR, CPM_GETCOLOUR, 0, 0));
- db_set_dw(NULL, "CLCExt", "3ddark", SendDlgItemMessage(hwndDlg, IDC_3DDARKCOLOR, CPM_GETCOLOUR, 0, 0));
+ db_set_dw(NULL, "CLCExt", "3dbright", SendDlgItemMessage(hwndDlg, IDC_3DLIGHTCOLOR, CPM_GETCOLOUR, 0, 0));
+ db_set_dw(NULL, "CLCExt", "3ddark", SendDlgItemMessage(hwndDlg, IDC_3DDARKCOLOR, CPM_GETCOLOUR, 0, 0));
- if(psd->pfnClcOptionsChanged)
+ if(psd->pfnClcOptionsChanged)
psd->pfnClcOptionsChanged();
if(psd->hwndCLUI) {
SendMessage(psd->hwndCLUI, WM_SIZE, 0, 0);
- PostMessage(psd->hwndCLUI, WM_USER+100, 0, 0); // CLUIINTM_REDRAW
+ PostMessage(psd->hwndCLUI, WM_USER+100, 0, 0); // CLUIINTM_REDRAW
}
- break;
- }
- }
- break;
- case WM_DESTROY:
- DestroyMenu(psd->hMenuItems);
- break;
- case WM_NCDESTROY:
- free(psd);
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)0);
- break;
- }
- return FALSE;
+ break;
+ }
+ }
+ break;
+ case WM_DESTROY:
+ DestroyMenu(psd->hMenuItems);
+ break;
+ case WM_NCDESTROY:
+ free(psd);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)0);
+ break;
+ }
+ return FALSE;
}
-/*
- * unimplemented
+/*
+ * unimplemented
*/
static BOOL CALLBACK SkinEdit_ImageItemEditProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- return FALSE;
+ return FALSE;
}
static INT_PTR SkinEdit_FillByCurrentSel(WPARAM wParam, LPARAM lParam)
{
- if(wParam)
- FillOptionDialogByCurrentSel((HWND)wParam);
- return 0;
+ if(wParam)
+ FillOptionDialogByCurrentSel((HWND)wParam);
+ return 0;
}
-/*
- * service function
+/*
+ * service function
* creates additional tab pages under the given parent window handle
* expects a SKINDESCRIPTON * in lParam
*/
static INT_PTR SkinEdit_Invoke(WPARAM wParam, LPARAM lParam)
{
- SKINDESCRIPTION *psd = (SKINDESCRIPTION *)lParam;
- TCITEM tci = {0};
- RECT rcClient;
- int iTabs;
-
- if(psd->cbSize != sizeof(SKINDESCRIPTION))
- return 0;
-
- iTabs = TabCtrl_GetItemCount(psd->hWndTab);
- GetClientRect(psd->hWndParent, &rcClient);
-
- tci.mask = TCIF_PARAM|TCIF_TEXT;
- tci.lParam = (LPARAM)CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_SKINITEMEDIT), psd->hWndParent, SkinEdit_ExtBkDlgProc, (LPARAM)psd);
-
- tci.pszText = TranslateT("Skin items");
- TabCtrl_InsertItem(psd->hWndTab, iTabs++, &tci);
- MoveWindow((HWND)tci.lParam, 5, 25, rcClient.right - 9, rcClient.bottom - 60, 1);
- psd->hwndSkinEdit = (HWND)tci.lParam;
-
- /*
- tci.lParam = (LPARAM)CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_IMAGEITEMEDIT), psd->hWndParent, SkinEdit_ImageItemEditProc, (LPARAM)psd);
- tci.pszText = TranslateT("Image items");
- TabCtrl_InsertItem(psd->hWndTab, iTabs++, &tci);
- MoveWindow((HWND)tci.lParam, 5, 25, rcClient.right - 9, rcClient.bottom - 60, 1);
- psd->hwndImageEdit = (HWND)tci.lParam;
- */
-
- return (INT_PTR)psd->hwndSkinEdit;
+ SKINDESCRIPTION *psd = (SKINDESCRIPTION *)lParam;
+ TCITEM tci = {0};
+ RECT rcClient;
+ int iTabs;
+
+ if(psd->cbSize != sizeof(SKINDESCRIPTION))
+ return 0;
+
+ iTabs = TabCtrl_GetItemCount(psd->hWndTab);
+ GetClientRect(psd->hWndParent, &rcClient);
+
+ tci.mask = TCIF_PARAM|TCIF_TEXT;
+ tci.lParam = (LPARAM)CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_SKINITEMEDIT), psd->hWndParent, SkinEdit_ExtBkDlgProc, (LPARAM)psd);
+
+ tci.pszText = TranslateT("Skin items");
+ TabCtrl_InsertItem(psd->hWndTab, iTabs++, &tci);
+ MoveWindow((HWND)tci.lParam, 5, 25, rcClient.right - 9, rcClient.bottom - 60, 1);
+ psd->hwndSkinEdit = (HWND)tci.lParam;
+
+ /*
+ tci.lParam = (LPARAM)CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_IMAGEITEMEDIT), psd->hWndParent, SkinEdit_ImageItemEditProc, (LPARAM)psd);
+ tci.pszText = TranslateT("Image items");
+ TabCtrl_InsertItem(psd->hWndTab, iTabs++, &tci);
+ MoveWindow((HWND)tci.lParam, 5, 25, rcClient.right - 9, rcClient.bottom - 60, 1);
+ psd->hwndImageEdit = (HWND)tci.lParam;
+ */
+
+ return (INT_PTR)psd->hwndSkinEdit;
}
static HANDLE hSvc_invoke = 0, hSvc_fillby = 0;
static int LoadModule()
{
- hSvc_invoke = CreateServiceFunction(MS_CLNSE_INVOKE, SkinEdit_Invoke);
- hSvc_fillby = CreateServiceFunction(MS_CLNSE_FILLBYCURRENTSEL, SkinEdit_FillByCurrentSel);
- return 0;
+ hSvc_invoke = CreateServiceFunction(MS_CLNSE_INVOKE, SkinEdit_Invoke);
+ hSvc_fillby = CreateServiceFunction(MS_CLNSE_FILLBYCURRENTSEL, SkinEdit_FillByCurrentSel);
+ return 0;
}
extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion)
@@ -928,28 +927,28 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) static int systemModulesLoaded(WPARAM wParam, LPARAM lParam)
{
- ModulesLoaded(wParam, lParam);
- return 0;
+ ModulesLoaded(wParam, lParam);
+ return 0;
}
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- return(LoadModule());
+ return(LoadModule());
}
static int ShutdownProc(WPARAM wParam, LPARAM lParam)
{
- if(hSvc_invoke)
- DestroyServiceFunction(hSvc_invoke);
- if(hSvc_fillby)
- DestroyServiceFunction(hSvc_fillby);
- return 0;
+ if(hSvc_invoke)
+ DestroyServiceFunction(hSvc_invoke);
+ if(hSvc_fillby)
+ DestroyServiceFunction(hSvc_fillby);
+ return 0;
}
extern "C" int __declspec(dllexport) Unload(void)
{
- return ShutdownProc(0, 0);
+ return ShutdownProc(0, 0);
}
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID reserved)
@@ -958,4 +957,3 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID reserved) DisableThreadLibraryCalls(g_hInst);
return TRUE;
}
-
diff --git a/plugins/Clist_nicer/skineditor/src/skineditres.h b/plugins/Clist_nicer/skineditor/src/skineditres.h index 33183de397..ec4da1453d 100644 --- a/plugins/Clist_nicer/skineditor/src/skineditres.h +++ b/plugins/Clist_nicer/skineditor/src/skineditres.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by skinedit.rc
+// Включаемый файл, созданный в Microsoft Visual C++.
+// Используется d:\MNG_orig\plugins\Clist_nicer\skineditor\res\skinedit.rc
//
#define IDD_SKINITEMEDIT 101
#define IDD_IMAGEITEMEDIT 102
|