diff --git a/Scylla/AboutGui.cpp b/Scylla/AboutGui.cpp
index f2b746a..3e87d15 100644
--- a/Scylla/AboutGui.cpp
+++ b/Scylla/AboutGui.cpp
@@ -1,30 +1,124 @@
#include "AboutGui.h"
#include "definitions.h"
+const WCHAR AboutGui::TEXT_VISIT[] = L"Visit http://kickme.to/grn and http://forum.tuts4you.com";
+const WCHAR AboutGui::TEXT_DEVELOPED[] = L"Developed with Microsoft Visual Studio, written in pure C/C++";
+const WCHAR AboutGui::TEXT_CREDIT_DISTORM[] = L"This tool uses the diStorm disassembler library v3";
+const WCHAR AboutGui::TEXT_CREDIT_YODA[] = L"The PE Rebuilder engine is based on Realign DLL v1.5 by yoda";
+const WCHAR AboutGui::TEXT_CREDIT_SILK[] = L"The small icons are taken from the Silk icon package";
+const WCHAR AboutGui::TEXT_CREDIT_WTL[] = L"Windows Template Library v8 is used for the GUI";
+const WCHAR AboutGui::TEXT_GREETINGS[] = L"Greetz: metr0, G36KV and all from the gRn Team";
+const WCHAR AboutGui::TEXT_LICENSE[] = L"Scylla is licensed under the GNU General Public License v3";
+
+const WCHAR AboutGui::URL_VISIT1[] = L"http://kickme.to/grn";
+const WCHAR AboutGui::URL_VISIT2[] = L"http://forum.tuts4you.com";
+const WCHAR AboutGui::URL_DISTORM[] = L"http://code.google.com/p/distorm/";
+const WCHAR AboutGui::URL_WTL[] = L"http://wtl.sourceforge.net";
+const WCHAR AboutGui::URL_SILK[] = L"http://www.famfamfam.com";
+const WCHAR AboutGui::URL_LICENSE[] = L"http://www.gnu.org/licenses/gpl-3.0.html";
+
BOOL AboutGui::OnInitDialog(CWindow wndFocus, LPARAM lInitParam)
{
StaticTitle.Attach(GetDlgItem(IDC_STATIC_ABOUT_TITLE));
- StaticAbout.Attach(GetDlgItem(IDC_STATIC_ABOUT));
+ StaticDeveloped.Attach(GetDlgItem(IDC_STATIC_DEVELOPED));
+ StaticGreetings.Attach(GetDlgItem(IDC_STATIC_GREETINGS));
+ StaticYoda.Attach(GetDlgItem(IDC_STATIC_YODA));
+
+ LinkVisit.Attach(GetDlgItem(IDC_SYSLINK_VISIT));
+ LinkDistorm.Attach(GetDlgItem(IDC_SYSLINK_DISTORM));
+ LinkWTL.Attach(GetDlgItem(IDC_SYSLINK_WTL));
+ LinkSilk.Attach(GetDlgItem(IDC_SYSLINK_SILK));
+ LinkLicense.Attach(GetDlgItem(IDC_SYSLINK_LICENSE));
LOGFONT lf;
CFontHandle font = StaticTitle.GetFont();
font.GetLogFont(&lf);
lf.lfWeight = FW_BOLD;
FontBold.CreateFontIndirect(&lf);
StaticTitle.SetFont(FontBold, FALSE);
StaticTitle.SetWindowText(TEXT(APPNAME)TEXT(" ")TEXT(ARCHITECTURE)TEXT(" ")TEXT(APPVERSION));
+ StaticDeveloped.SetWindowText(TEXT_DEVELOPED);
+ StaticGreetings.SetWindowText(TEXT_GREETINGS);
+ StaticYoda.SetWindowText(TEXT_CREDIT_YODA);
+
+ setupLinks();
- StaticAbout.SetWindowText(TEXT(DEVELOPED)TEXT("\n\n\n")TEXT(CREDIT_DISTORM)TEXT("\n")TEXT(CREDIT_YODA)TEXT("\n")TEXT(CREDIT_WTL)TEXT("\n")TEXT(CREDIT_SILK)TEXT("\n\n")TEXT(GREETINGS)TEXT("\n\n")TEXT(VISIT));
CenterWindow();
- return TRUE;
+ GotoDlgCtrl(GetDlgItem(IDOK));
+ return FALSE;
}
-void AboutGui::OnCancel(UINT uNotifyCode, int nID, CWindow wndCtl)
+void AboutGui::OnClose()
{
+ TooltipDistorm.DestroyWindow();
+ TooltipWTL.DestroyWindow();
+ TooltipSilk.DestroyWindow();
+ TooltipLicense.DestroyWindow();
FontBold.DeleteObject();
EndDialog(0);
}
+
+LRESULT AboutGui::OnLink(NMHDR* pnmh)
+{
+ const NMLINK* link = (NMLINK*)pnmh;
+ ShellExecute(NULL, L"open", link->item.szUrl, NULL, NULL, SW_SHOW);
+ return 0;
+}
+
+void AboutGui::OnExit(UINT uNotifyCode, int nID, CWindow wndCtl)
+{
+ SendMessage(WM_CLOSE);
+}
+
+void AboutGui::setupLinks()
+{
+ LITEM item;
+ item.mask = LIF_ITEMINDEX | LIF_URL;
+ item.iLink = 0;
+
+ LinkDistorm.SetWindowText(TEXT_CREDIT_DISTORM);
+ wcscpy_s(item.szUrl, _countof(item.szUrl), URL_DISTORM);
+ LinkDistorm.SetItem(&item);
+
+ LinkWTL.SetWindowText(TEXT_CREDIT_WTL);
+ wcscpy_s(item.szUrl, _countof(item.szUrl), URL_WTL);
+ LinkWTL.SetItem(&item);
+
+ LinkSilk.SetWindowText(TEXT_CREDIT_SILK);
+ wcscpy_s(item.szUrl, _countof(item.szUrl), URL_SILK);
+ LinkSilk.SetItem(&item);
+
+ LinkLicense.SetWindowText(TEXT_LICENSE);
+ wcscpy_s(item.szUrl, _countof(item.szUrl), URL_LICENSE);
+ LinkLicense.SetItem(&item);
+
+ LinkVisit.SetWindowText(TEXT_VISIT);
+ wcscpy_s(item.szUrl, _countof(item.szUrl), URL_VISIT1);
+ LinkVisit.SetItem(&item);
+ item.iLink = 1;
+ wcscpy_s(item.szUrl, _countof(item.szUrl), URL_VISIT2);
+ LinkVisit.SetItem(&item);
+
+ TooltipDistorm.Create(m_hWnd, NULL, NULL, TTS_NOPREFIX, WS_EX_TOPMOST);
+ TooltipWTL.Create(m_hWnd, NULL, NULL, TTS_NOPREFIX, WS_EX_TOPMOST);
+ TooltipSilk.Create(m_hWnd, NULL, NULL, TTS_NOPREFIX, WS_EX_TOPMOST);
+ TooltipLicense.Create(m_hWnd, NULL, NULL, TTS_NOPREFIX, WS_EX_TOPMOST);
+
+ setupTooltip(TooltipDistorm, LinkDistorm, URL_DISTORM);
+ setupTooltip(TooltipWTL, LinkWTL, URL_WTL);
+ setupTooltip(TooltipSilk, LinkSilk, URL_SILK);
+ setupTooltip(TooltipLicense, LinkLicense, URL_LICENSE);
+}
+
+void AboutGui::setupTooltip(CToolTipCtrl tooltip, CWindow window, const WCHAR* text)
+{
+ CToolInfo ti(TTF_SUBCLASS, window);
+
+ window.GetClientRect(&ti.rect);
+ ti.lpszText = const_cast(text);
+ tooltip.AddTool(ti);
+}
diff --git a/Scylla/AboutGui.h b/Scylla/AboutGui.h
index fc8c24d..0f8c8d5 100644
--- a/Scylla/AboutGui.h
+++ b/Scylla/AboutGui.h
@@ -1,41 +1,90 @@
#pragma once
#include
#include "resource.h"
// WTL
#include // base ATL classes
#include // base WTL classes
#include // ATL GUI classes
#include // WTL enhanced msg map macros
#include // WTL controls
class AboutGui : public CDialogImpl
{
public:
enum { IDD = IDD_DLG_ABOUT };
BEGIN_MSG_MAP(AboutGui)
MSG_WM_INITDIALOG(OnInitDialog)
+ MSG_WM_CLOSE(OnClose)
- COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel)
+ NOTIFY_HANDLER_EX(IDC_SYSLINK_DISTORM, NM_CLICK, OnLink)
+ NOTIFY_HANDLER_EX(IDC_SYSLINK_DISTORM, NM_RETURN, OnLink)
+ NOTIFY_HANDLER_EX(IDC_SYSLINK_WTL, NM_CLICK, OnLink)
+ NOTIFY_HANDLER_EX(IDC_SYSLINK_WTL, NM_RETURN, OnLink)
+ NOTIFY_HANDLER_EX(IDC_SYSLINK_SILK, NM_CLICK, OnLink)
+ NOTIFY_HANDLER_EX(IDC_SYSLINK_SILK, NM_RETURN, OnLink)
+ NOTIFY_HANDLER_EX(IDC_SYSLINK_VISIT, NM_CLICK, OnLink)
+ NOTIFY_HANDLER_EX(IDC_SYSLINK_VISIT, NM_RETURN, OnLink)
+
+ COMMAND_ID_HANDLER_EX(IDOK, OnExit)
+ COMMAND_ID_HANDLER_EX(IDCANCEL, OnExit)
END_MSG_MAP()
protected:
// Controls
CStatic StaticTitle;
- CStatic StaticAbout;
+ CStatic StaticDeveloped;
+ CStatic StaticGreetings;
+ CStatic StaticYoda;
+
+ CLinkCtrl LinkVisit;
+ CLinkCtrl LinkDistorm;
+ CLinkCtrl LinkWTL;
+ CLinkCtrl LinkSilk;
+ CLinkCtrl LinkLicense;
+
+ CToolTipCtrl TooltipDistorm;
+ CToolTipCtrl TooltipWTL;
+ CToolTipCtrl TooltipSilk;
+ CToolTipCtrl TooltipLicense;
// Handles
CFontHandle FontBold;
+ // Texts
+
+ static const WCHAR TEXT_VISIT[];
+ static const WCHAR TEXT_DEVELOPED[];
+ static const WCHAR TEXT_CREDIT_DISTORM[];
+ static const WCHAR TEXT_CREDIT_YODA[];
+ static const WCHAR TEXT_CREDIT_WTL[];
+ static const WCHAR TEXT_CREDIT_SILK[];
+ static const WCHAR TEXT_GREETINGS[];
+ static const WCHAR TEXT_LICENSE[];
+
+ // URLs
+
+ static const WCHAR URL_VISIT1[];
+ static const WCHAR URL_VISIT2[];
+ static const WCHAR URL_DISTORM[];
+ static const WCHAR URL_WTL[];
+ static const WCHAR URL_SILK[];
+ static const WCHAR URL_LICENSE[];
+
protected:
// Message handlers
BOOL OnInitDialog(CWindow wndFocus, LPARAM lInitParam);
- void OnCancel(UINT uNotifyCode, int nID, CWindow wndCtl);
+ void OnClose();
+ LRESULT OnLink(NMHDR* pnmh);
+ void OnExit(UINT uNotifyCode, int nID, CWindow wndCtl);
+
+ void setupLinks();
+ void setupTooltip(CToolTipCtrl tooltip, CWindow window, const WCHAR* text);
};
diff --git a/Scylla/MainGui.rc b/Scylla/MainGui.rc
index a91d674..dd0857e 100644
Binary files a/Scylla/MainGui.rc and b/Scylla/MainGui.rc differ
diff --git a/Scylla/Scylla.vcxproj b/Scylla/Scylla.vcxproj
index c6ab387..f04e963 100644
--- a/Scylla/Scylla.vcxproj
+++ b/Scylla/Scylla.vcxproj
@@ -1,220 +1,227 @@
Debug
Win32
Debug
x64
Release
Win32
Release
x64
{710434C9-FC4B-4F1D-B318-E10ADC78499F}
Win32Proj
Scylla
Application
true
Unicode
Application
true
Unicode
Application
false
true
Unicode
v100
Application
false
true
Unicode
true
$(SolutionDir)$(Platform)\$(Configuration)\
$(Platform)\$(Configuration)\
true
false
$(SolutionDir)$(Platform)\$(Configuration)\
$(Platform)\$(Configuration)\
false
Level3
Disabled
WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
$(SolutionDir)diStorm\include;%(AdditionalIncludeDirectories)
Windows
true
$(SolutionDir)$(Platform)\$(Configuration)\diStorm.lib;%(AdditionalDependencies)
type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df'
Level3
Disabled
WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
$(SolutionDir)diStorm\include;%(AdditionalIncludeDirectories)
Windows
true
$(SolutionDir)$(Platform)\$(Configuration)\diStorm.lib;%(AdditionalDependencies)
type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df'
Level3
MaxSpeed
true
true
WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
MultiThreaded
$(SolutionDir)diStorm\include;%(AdditionalIncludeDirectories)
+ true
Windows
false
true
true
$(SolutionDir)$(Platform)\$(Configuration)\diStorm.lib;%(AdditionalDependencies)
type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df'
Level3
MaxSpeed
true
true
WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
MultiThreaded
$(SolutionDir)diStorm\include;%(AdditionalIncludeDirectories)
+ true
Windows
false
true
true
$(SolutionDir)$(Platform)\$(Configuration)\diStorm.lib;%(AdditionalDependencies)
type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df'
+
+
+
+
+
\ No newline at end of file
diff --git a/Scylla/definitions.h b/Scylla/definitions.h
index 4c22d8c..065b0a0 100644
--- a/Scylla/definitions.h
+++ b/Scylla/definitions.h
@@ -1,38 +1,28 @@
#pragma once
#define APPNAME "Scylla"
#ifdef _WIN64
#define ARCHITECTURE "x64"
#define PRINTF_DWORD_PTR "%I64X"
#define PRINTF_DWORD_PTR_FULL "%016I64X"
#define PRINTF_DWORD_PTR_HALF "%08I64X"
#define PRINTF_INTEGER "%I64u"
#define MAX_HEX_VALUE_EDIT_LENGTH 16
#else
#define ARCHITECTURE "x86"
#define PRINTF_DWORD_PTR "%X"
#define PRINTF_DWORD_PTR_FULL "%08X"
#define PRINTF_DWORD_PTR_HALF "%08X"
#define PRINTF_INTEGER "%u"
#define MAX_HEX_VALUE_EDIT_LENGTH 8
#endif
#define APPVERSION "v0.4"
-#define RECOMMENDED_OS "This tool was designed to work with Windows 7 x64"
-#define DEVELOPED "Developed with Microsoft Visual Studio, written in pure C/C++"
-#define CREDIT_DISTORM "This tool uses the diStorm disassembler library v3 -> http://code.google.com/p/distorm/"
-#define CREDIT_YODA "The PE Rebuilder engine is based on the Realign DLL v1.5 by yoda"
-#define CREDIT_SILK "The small icons are taken from the Silk icon package -> http://www.famfamfam.com"
-#define CREDIT_WTL "Windows Template Library v8 is used for the GUI -> http://wtl.sourceforge.net"
-#define GREETINGS "Greetz: metr0, G36KV and all from the gRn Team"
-#define VISIT "Visit http://kickme.to/grn and http://forum.tuts4you.com "
-
-
#define PLUGIN_MENU_BASE_ID 0x10
\ No newline at end of file
diff --git a/Scylla/resource.h b/Scylla/resource.h
index 7f255d2..3520a62 100644
Binary files a/Scylla/resource.h and b/Scylla/resource.h differ