Skip to content

Commit e462fa8

Browse files
committed
完成空格启动暂停,F11切换全屏功能。
1 parent a63673c commit e462fa8

16 files changed

+1002
-0
lines changed

NameListRoll.sln

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NameListRoll", "NameListRoll\NameListRoll.vcxproj", "{73D3F76F-65FA-48D8-BC0A-4C9E54980D1C}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{73D3F76F-65FA-48D8-BC0A-4C9E54980D1C}.Debug|x64.ActiveCfg = Debug|x64
17+
{73D3F76F-65FA-48D8-BC0A-4C9E54980D1C}.Debug|x64.Build.0 = Debug|x64
18+
{73D3F76F-65FA-48D8-BC0A-4C9E54980D1C}.Debug|x86.ActiveCfg = Debug|Win32
19+
{73D3F76F-65FA-48D8-BC0A-4C9E54980D1C}.Debug|x86.Build.0 = Debug|Win32
20+
{73D3F76F-65FA-48D8-BC0A-4C9E54980D1C}.Release|x64.ActiveCfg = Release|x64
21+
{73D3F76F-65FA-48D8-BC0A-4C9E54980D1C}.Release|x64.Build.0 = Release|x64
22+
{73D3F76F-65FA-48D8-BC0A-4C9E54980D1C}.Release|x86.ActiveCfg = Release|Win32
23+
{73D3F76F-65FA-48D8-BC0A-4C9E54980D1C}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
EndGlobal

NameListRoll/NameListRoll.cpp

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
2+
// NameListRoll.cpp : 定义应用程序的类行为。
3+
//
4+
5+
#include "stdafx.h"
6+
#include "NameListRoll.h"
7+
#include "NameListRollDlg.h"
8+
9+
#ifdef _DEBUG
10+
#define new DEBUG_NEW
11+
#endif
12+
13+
14+
// CNameListRollApp
15+
16+
BEGIN_MESSAGE_MAP(CNameListRollApp, CWinApp)
17+
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
18+
END_MESSAGE_MAP()
19+
20+
21+
// CNameListRollApp 构造
22+
23+
CNameListRollApp::CNameListRollApp()
24+
{
25+
// 支持重新启动管理器
26+
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
27+
28+
// TODO: 在此处添加构造代码,
29+
// 将所有重要的初始化放置在 InitInstance 中
30+
}
31+
32+
33+
// 唯一的一个 CNameListRollApp 对象
34+
35+
CNameListRollApp theApp;
36+
37+
38+
// CNameListRollApp 初始化
39+
40+
BOOL CNameListRollApp::InitInstance()
41+
{
42+
// 如果一个运行在 Windows XP 上的应用程序清单指定要
43+
// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
44+
//则需要 InitCommonControlsEx()。 否则,将无法创建窗口。
45+
INITCOMMONCONTROLSEX InitCtrls;
46+
InitCtrls.dwSize = sizeof(InitCtrls);
47+
// 将它设置为包括所有要在应用程序中使用的
48+
// 公共控件类。
49+
InitCtrls.dwICC = ICC_WIN95_CLASSES;
50+
InitCommonControlsEx(&InitCtrls);
51+
52+
CWinApp::InitInstance();
53+
54+
55+
// 创建 shell 管理器,以防对话框包含
56+
// 任何 shell 树视图控件或 shell 列表视图控件。
57+
CShellManager *pShellManager = new CShellManager;
58+
59+
// 激活“Windows Native”视觉管理器,以便在 MFC 控件中启用主题
60+
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
61+
62+
// 标准初始化
63+
// 如果未使用这些功能并希望减小
64+
// 最终可执行文件的大小,则应移除下列
65+
// 不需要的特定初始化例程
66+
// 更改用于存储设置的注册表项
67+
// TODO: 应适当修改该字符串,
68+
// 例如修改为公司或组织名
69+
SetRegistryKey(_T("应用程序向导生成的本地应用程序"));
70+
71+
CNameListRollDlg dlg;
72+
m_pMainWnd = &dlg;
73+
INT_PTR nResponse = dlg.DoModal();
74+
if (nResponse == IDOK)
75+
{
76+
// TODO: 在此放置处理何时用
77+
// “确定”来关闭对话框的代码
78+
}
79+
else if (nResponse == IDCANCEL)
80+
{
81+
// TODO: 在此放置处理何时用
82+
// “取消”来关闭对话框的代码
83+
}
84+
else if (nResponse == -1)
85+
{
86+
TRACE(traceAppMsg, 0, "警告: 对话框创建失败,应用程序将意外终止。\n");
87+
TRACE(traceAppMsg, 0, "警告: 如果您在对话框上使用 MFC 控件,则无法 #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS。\n");
88+
}
89+
90+
// 删除上面创建的 shell 管理器。
91+
if (pShellManager != NULL)
92+
{
93+
delete pShellManager;
94+
}
95+
96+
#ifndef _AFXDLL
97+
ControlBarCleanUp();
98+
#endif
99+
100+
// 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序,
101+
// 而不是启动应用程序的消息泵。
102+
return FALSE;
103+
}
104+

NameListRoll/NameListRoll.h

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
// NameListRoll.h : PROJECT_NAME 应用程序的主头文件
3+
//
4+
5+
#pragma once
6+
7+
#ifndef __AFXWIN_H__
8+
#error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件"
9+
#endif
10+
11+
#include "resource.h" // 主符号
12+
13+
14+
// CNameListRollApp:
15+
// 有关此类的实现,请参阅 NameListRoll.cpp
16+
//
17+
18+
class CNameListRollApp : public CWinApp
19+
{
20+
public:
21+
CNameListRollApp();
22+
23+
// 重写
24+
public:
25+
virtual BOOL InitInstance();
26+
27+
// 实现
28+
29+
DECLARE_MESSAGE_MAP()
30+
};
31+
32+
extern CNameListRollApp theApp;

NameListRoll/NameListRoll.rc

9.12 KB
Binary file not shown.

NameListRoll/NameListRoll.vcxproj

+218
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<ProjectGuid>{73D3F76F-65FA-48D8-BC0A-4C9E54980D1C}</ProjectGuid>
23+
<RootNamespace>NameListRoll</RootNamespace>
24+
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
25+
<Keyword>MFCProj</Keyword>
26+
</PropertyGroup>
27+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
29+
<ConfigurationType>Application</ConfigurationType>
30+
<UseDebugLibraries>true</UseDebugLibraries>
31+
<PlatformToolset>v140</PlatformToolset>
32+
<CharacterSet>Unicode</CharacterSet>
33+
<UseOfMfc>Static</UseOfMfc>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>Application</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v140</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
<UseOfMfc>Static</UseOfMfc>
42+
</PropertyGroup>
43+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
44+
<ConfigurationType>Application</ConfigurationType>
45+
<UseDebugLibraries>true</UseDebugLibraries>
46+
<PlatformToolset>v140</PlatformToolset>
47+
<CharacterSet>Unicode</CharacterSet>
48+
<UseOfMfc>Static</UseOfMfc>
49+
</PropertyGroup>
50+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
51+
<ConfigurationType>Application</ConfigurationType>
52+
<UseDebugLibraries>false</UseDebugLibraries>
53+
<PlatformToolset>v140</PlatformToolset>
54+
<WholeProgramOptimization>true</WholeProgramOptimization>
55+
<CharacterSet>Unicode</CharacterSet>
56+
<UseOfMfc>Static</UseOfMfc>
57+
</PropertyGroup>
58+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
59+
<ImportGroup Label="ExtensionSettings">
60+
</ImportGroup>
61+
<ImportGroup Label="Shared">
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
73+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
74+
</ImportGroup>
75+
<PropertyGroup Label="UserMacros" />
76+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
77+
<LinkIncremental>true</LinkIncremental>
78+
</PropertyGroup>
79+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
80+
<LinkIncremental>true</LinkIncremental>
81+
</PropertyGroup>
82+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
83+
<LinkIncremental>false</LinkIncremental>
84+
</PropertyGroup>
85+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
86+
<LinkIncremental>false</LinkIncremental>
87+
</PropertyGroup>
88+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
89+
<ClCompile>
90+
<PrecompiledHeader>Use</PrecompiledHeader>
91+
<WarningLevel>Level3</WarningLevel>
92+
<Optimization>Disabled</Optimization>
93+
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
94+
</ClCompile>
95+
<Link>
96+
<SubSystem>Windows</SubSystem>
97+
</Link>
98+
<Midl>
99+
<MkTypLibCompatible>false</MkTypLibCompatible>
100+
<ValidateAllParameters>true</ValidateAllParameters>
101+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
102+
</Midl>
103+
<ResourceCompile>
104+
<Culture>0x0804</Culture>
105+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
106+
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
107+
</ResourceCompile>
108+
</ItemDefinitionGroup>
109+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
110+
<ClCompile>
111+
<PrecompiledHeader>Use</PrecompiledHeader>
112+
<WarningLevel>Level3</WarningLevel>
113+
<Optimization>Disabled</Optimization>
114+
<PreprocessorDefinitions>_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
115+
</ClCompile>
116+
<Link>
117+
<SubSystem>Windows</SubSystem>
118+
</Link>
119+
<Midl>
120+
<MkTypLibCompatible>false</MkTypLibCompatible>
121+
<ValidateAllParameters>true</ValidateAllParameters>
122+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
123+
</Midl>
124+
<ResourceCompile>
125+
<Culture>0x0804</Culture>
126+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
127+
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
128+
</ResourceCompile>
129+
</ItemDefinitionGroup>
130+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
131+
<ClCompile>
132+
<WarningLevel>Level3</WarningLevel>
133+
<PrecompiledHeader>Use</PrecompiledHeader>
134+
<Optimization>MaxSpeed</Optimization>
135+
<FunctionLevelLinking>true</FunctionLevelLinking>
136+
<IntrinsicFunctions>true</IntrinsicFunctions>
137+
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
138+
</ClCompile>
139+
<Link>
140+
<SubSystem>Windows</SubSystem>
141+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
142+
<OptimizeReferences>true</OptimizeReferences>
143+
</Link>
144+
<Midl>
145+
<MkTypLibCompatible>false</MkTypLibCompatible>
146+
<ValidateAllParameters>true</ValidateAllParameters>
147+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
148+
</Midl>
149+
<ResourceCompile>
150+
<Culture>0x0804</Culture>
151+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
152+
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
153+
</ResourceCompile>
154+
</ItemDefinitionGroup>
155+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
156+
<ClCompile>
157+
<WarningLevel>Level3</WarningLevel>
158+
<PrecompiledHeader>Use</PrecompiledHeader>
159+
<Optimization>MaxSpeed</Optimization>
160+
<FunctionLevelLinking>true</FunctionLevelLinking>
161+
<IntrinsicFunctions>true</IntrinsicFunctions>
162+
<PreprocessorDefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
163+
</ClCompile>
164+
<Link>
165+
<SubSystem>Windows</SubSystem>
166+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
167+
<OptimizeReferences>true</OptimizeReferences>
168+
</Link>
169+
<Midl>
170+
<MkTypLibCompatible>false</MkTypLibCompatible>
171+
<ValidateAllParameters>true</ValidateAllParameters>
172+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
173+
</Midl>
174+
<ResourceCompile>
175+
<Culture>0x0804</Culture>
176+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
177+
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
178+
</ResourceCompile>
179+
</ItemDefinitionGroup>
180+
<ItemGroup>
181+
<Text Include="config.txt" />
182+
<Text Include="ReadMe.txt" />
183+
</ItemGroup>
184+
<ItemGroup>
185+
<ClInclude Include="NameListRoll.h" />
186+
<ClInclude Include="NameListRollDlg.h" />
187+
<ClInclude Include="Resource.h" />
188+
<ClInclude Include="stdafx.h" />
189+
<ClInclude Include="targetver.h" />
190+
</ItemGroup>
191+
<ItemGroup>
192+
<ClCompile Include="NameListRoll.cpp" />
193+
<ClCompile Include="NameListRollDlg.cpp" />
194+
<ClCompile Include="stdafx.cpp">
195+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
196+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
197+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
198+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
199+
</ClCompile>
200+
</ItemGroup>
201+
<ItemGroup>
202+
<ResourceCompile Include="NameListRoll.rc" />
203+
</ItemGroup>
204+
<ItemGroup>
205+
<None Include="res\NameListRoll.rc2" />
206+
</ItemGroup>
207+
<ItemGroup>
208+
<Image Include="res\NameListRoll.ico" />
209+
</ItemGroup>
210+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
211+
<ImportGroup Label="ExtensionTargets">
212+
</ImportGroup>
213+
<ProjectExtensions>
214+
<VisualStudio>
215+
<UserProperties RESOURCE_FILE="NameListRoll.rc" />
216+
</VisualStudio>
217+
</ProjectExtensions>
218+
</Project>

0 commit comments

Comments
 (0)