Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions buildenv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ add_custom_command(
"${CMAKE_CURRENT_LIST_DIR}/${MAIN_TARGET_NAME}.sln"
-t:restore
-p:RestorePackagesConfig=true
-p:Configuration=$<CONFIG>
-p:Platform=${TARGET_ARCH_ID}
COMMENT "Restoring NuGet packages"
)

Expand Down
17 changes: 17 additions & 0 deletions buildenv/WinPinMenu.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.8.34931.61
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinPinMenu", "..\src\app\WinPinMenu.vcxproj", "{C12D10FE-D63C-4834-9FF5-F26DD4BEA551}"
ProjectSection(ProjectDependencies) = postProject
{7D0481BF-835E-4FAA-820C-0EF96D007C7A} = {7D0481BF-835E-4FAA-820C-0EF96D007C7A}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CMake", "CMake", "{4A16127A-5EE7-4701-99FE-D36C5F8C3866}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -16,6 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wtlx", "..\src\wtlx\wtlx.vcxproj", "{7D0481BF-835E-4FAA-820C-0EF96D007C7A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Expand All @@ -38,6 +43,18 @@ Global
{C12D10FE-D63C-4834-9FF5-F26DD4BEA551}.Release|x64.Build.0 = Release|x64
{C12D10FE-D63C-4834-9FF5-F26DD4BEA551}.Release|x86.ActiveCfg = Release|Win32
{C12D10FE-D63C-4834-9FF5-F26DD4BEA551}.Release|x86.Build.0 = Release|Win32
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Debug|ARM64.ActiveCfg = Debug|x64
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Debug|ARM64.Build.0 = Debug|x64
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Debug|x64.ActiveCfg = Debug|x64
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Debug|x64.Build.0 = Debug|x64
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Debug|x86.ActiveCfg = Debug|Win32
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Debug|x86.Build.0 = Debug|Win32
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Release|ARM64.ActiveCfg = Release|x64
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Release|ARM64.Build.0 = Release|x64
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Release|x64.ActiveCfg = Release|x64
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Release|x64.Build.0 = Release|x64
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Release|x86.ActiveCfg = Release|Win32
{7D0481BF-835E-4FAA-820C-0EF96D007C7A}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
33 changes: 1 addition & 32 deletions src/app/AboutDlg.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// aboutdlg.cpp : implementation of the CAboutDlg class
//
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"

#include "resource.h"
#include "productmeta.h"
#include "Draw.h"

#include "aboutdlg.h"

Expand All @@ -31,42 +30,12 @@ LRESULT CAboutDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lPara
#else
m_lnkRelNotes.ShowWindow(SW_HIDE);
#endif
m_clrLink = m_lnkLicense.m_clrLink;
m_clrVisited = m_lnkLicense.m_clrVisited;

UpdateColors();
return TRUE;
}

LRESULT CAboutDlg::OnThemeChange(UINT, WPARAM, LPARAM, BOOL& bHandled)
{
bHandled = FALSE;
UpdateColors();
return 0L;
}


LRESULT CAboutDlg::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
EndDialog(wID);
return 0;
}

void CAboutDlg::UpdateColors()
{
auto clrLink = m_clrLink;
auto clrVisited = m_clrVisited;
if (IsInDarkMode())
{
clrLink = HLS_TRANSFORM(clrLink, 35, 0);
clrVisited = HLS_TRANSFORM(clrVisited, 30, 0);
}
ApplyLinkColor(m_lnkLicense, clrLink, clrVisited);
ApplyLinkColor(m_lnkRelNotes, clrLink, clrVisited);
}

void CAboutDlg::ApplyLinkColor(CHyperLink& link, COLORREF clrLink, COLORREF clrVisited) const
{
link.m_clrLink = clrLink;
link.m_clrVisited = clrVisited;
}
13 changes: 3 additions & 10 deletions src/app/AboutDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/////////////////////////////////////////////////////////////////////////////

#pragma once
#include "FileVersionInfo.h"
#include <wtlx/FileVersionInfo.h>

class CAboutDlg;
using CUxAboutDialog = CUxModeWindow<CAboutDlg>;
Expand All @@ -17,7 +17,6 @@ class CAboutDlg
enum { IDD = IDD_ABOUTBOX };

BEGIN_MSG_MAP(CAboutDlg)
MESSAGE_HANDLER(WM_THEMECHANGED, OnThemeChange)
CHAIN_MSG_MAP(CUxAboutDialog)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
Expand All @@ -37,16 +36,10 @@ class CAboutDlg
// LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)

LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
LRESULT OnThemeChange(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);
LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);

void UpdateColors();
void ApplyLinkColor(CHyperLink& link, COLORREF clrLink, COLORREF clrVisited) const;

private:
COLORREF m_clrLink{ 0 };
COLORREF m_clrVisited{ 0 };
CHyperLink m_lnkLicense;
CHyperLink m_lnkRelNotes;
CUxModeHyperLink m_lnkLicense;
CUxModeHyperLink m_lnkRelNotes;
CFileVersionInfo m_fvi;
};
Loading