Skip to content

Commit

Permalink
兼容XP
Browse files Browse the repository at this point in the history
  • Loading branch information
xfgryujk committed Jan 15, 2017
1 parent ba18750 commit b4830a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CDConfig/CDConfig.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v120_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
Expand All @@ -41,7 +41,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
Expand Down
8 changes: 4 additions & 4 deletions CustomDesktop/CustomDesktop.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Comctl32.lib;Psapi.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Psapi.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
Expand All @@ -111,7 +111,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Comctl32.lib;Dwmapi.lib;Psapi.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Dwmapi.lib;Psapi.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand All @@ -129,7 +129,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>Comctl32.lib;Psapi.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Psapi.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand All @@ -148,7 +148,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>Comctl32.lib;Dwmapi.lib;Psapi.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Dwmapi.lib;Psapi.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Bscmake>
<PreserveSbr>true</PreserveSbr>
Expand Down
5 changes: 1 addition & 4 deletions CustomDesktop/TrayMenu.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "stdafx.h"
#include "TrayMenu.h"
#include <CommCtrl.h>
#include "resource.h"
#include "Global.h"
#include <CDAPI.h>
Expand All @@ -19,7 +18,7 @@ namespace cd
m_trayData.uID = 100;
m_trayData.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
m_trayData.uCallbackMessage = GetFileListMsgID();
LoadIconMetric(g_global.m_cdModule, MAKEINTRESOURCE(IDI_TRAY), LIM_SMALL, &m_trayData.hIcon);
m_trayData.hIcon = LoadIcon(g_global.m_cdModule, MAKEINTRESOURCE(IDI_TRAY));
_tcscpy_s(m_trayData.szTip, _T("CustomDesktop"));

Init();
Expand All @@ -28,8 +27,6 @@ namespace cd
TrayMenu::~TrayMenu()
{
Uninit();

DestroyIcon(m_trayData.hIcon);
}

bool TrayMenu::Init()
Expand Down

0 comments on commit b4830a5

Please sign in to comment.