Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit be1c916

Browse files
author
U-NVIDIA.COM\sahils
committed
Petzold aboutbox2 done
1 parent 0d38b14 commit be1c916

File tree

104 files changed

+1280
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+1280
-1
lines changed

‎About1/About1.c‎

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#include <Windows.h>
2+
#include "resource.h"
3+
4+
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
5+
BOOL CALLBACK AboutDlgProc(HWND, UINT, WPARAM, LPARAM);
6+
7+
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
8+
{
9+
static TCHAR szAppName[] = TEXT("About1");
10+
MSG msg;
11+
HWND hwnd;
12+
WNDCLASS wndclass;
13+
14+
wndclass.style = CS_HREDRAW | CS_VREDRAW;
15+
wndclass.lpfnWndProc = WndProc;
16+
wndclass.cbClsExtra = 0;
17+
wndclass.cbWndExtra = 0;
18+
wndclass.hInstance = hInstance;
19+
wndclass.hIcon = LoadIcon(hInstance, szAppName);
20+
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
21+
wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
22+
wndclass.lpszMenuName = szAppName;
23+
wndclass.lpszClassName = szAppName;
24+
25+
if (!RegisterClass(&wndclass))
26+
{
27+
MessageBox(NULL, TEXT("Error registering class"), szAppName, MB_ICONERROR);
28+
return 0;
29+
}
30+
31+
hwnd = CreateWindow(szAppName, TEXT("About Box Demo Program"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
32+
33+
ShowWindow(hwnd, iCmdShow);
34+
UpdateWindow(hwnd);
35+
36+
while (GetMessage(&msg, NULL, 0, 0))
37+
{
38+
TranslateMessage(&msg);
39+
DispatchMessage(&msg);
40+
}
41+
42+
return msg.wParam;
43+
}
44+
45+
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
46+
{
47+
static HINSTANCE hInstance;
48+
49+
switch (message)
50+
{
51+
case WM_CREATE:
52+
hInstance = ((LPCREATESTRUCT)lParam)->hInstance;
53+
return 0;
54+
break;
55+
case WM_COMMAND:
56+
switch (LOWORD(wParam))
57+
{
58+
case IDM_APP_ABOUT:
59+
DialogBox(hInstance, TEXT("AboutBox"), hwnd, AboutDlgProc);
60+
break;
61+
}
62+
return 0;
63+
break;
64+
case WM_DESTROY:
65+
PostQuitMessage(0);
66+
return 0;
67+
}
68+
69+
return DefWindowProc(hwnd, message, wParam, lParam);
70+
}
71+
72+
BOOL CALLBACK AboutDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
73+
{
74+
switch (message)
75+
{
76+
case WM_INITDIALOG:
77+
return TRUE;
78+
case WM_COMMAND:
79+
switch (LOWORD(wParam))
80+
{
81+
case IDOK:
82+
case IDCANCEL:
83+
EndDialog(hDlg, 0);
84+
return TRUE;
85+
}
86+
break;
87+
}
88+
89+
return FALSE;
90+
}

‎About1/About1.rc‎

1.26 KB
Binary file not shown.

‎About1/About1.vcxproj‎

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="15.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+
<VCProjectVersion>15.0</VCProjectVersion>
23+
<ProjectGuid>{4A7C3E76-CE3A-4445-AAE4-32DCF6DAA23B}</ProjectGuid>
24+
<RootNamespace>About1</RootNamespace>
25+
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
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>v141</PlatformToolset>
32+
<CharacterSet>MultiByte</CharacterSet>
33+
</PropertyGroup>
34+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
35+
<ConfigurationType>Application</ConfigurationType>
36+
<UseDebugLibraries>false</UseDebugLibraries>
37+
<PlatformToolset>v141</PlatformToolset>
38+
<WholeProgramOptimization>true</WholeProgramOptimization>
39+
<CharacterSet>MultiByte</CharacterSet>
40+
</PropertyGroup>
41+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
42+
<ConfigurationType>Application</ConfigurationType>
43+
<UseDebugLibraries>true</UseDebugLibraries>
44+
<PlatformToolset>v141</PlatformToolset>
45+
<CharacterSet>MultiByte</CharacterSet>
46+
</PropertyGroup>
47+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
48+
<ConfigurationType>Application</ConfigurationType>
49+
<UseDebugLibraries>false</UseDebugLibraries>
50+
<PlatformToolset>v141</PlatformToolset>
51+
<WholeProgramOptimization>true</WholeProgramOptimization>
52+
<CharacterSet>MultiByte</CharacterSet>
53+
</PropertyGroup>
54+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
55+
<ImportGroup Label="ExtensionSettings">
56+
</ImportGroup>
57+
<ImportGroup Label="Shared">
58+
</ImportGroup>
59+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
60+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
61+
</ImportGroup>
62+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
63+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
64+
</ImportGroup>
65+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
66+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
67+
</ImportGroup>
68+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
69+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
70+
</ImportGroup>
71+
<PropertyGroup Label="UserMacros" />
72+
<PropertyGroup />
73+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
74+
<ClCompile>
75+
<WarningLevel>Level3</WarningLevel>
76+
<Optimization>Disabled</Optimization>
77+
<SDLCheck>true</SDLCheck>
78+
<ConformanceMode>true</ConformanceMode>
79+
</ClCompile>
80+
</ItemDefinitionGroup>
81+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
82+
<ClCompile>
83+
<WarningLevel>Level3</WarningLevel>
84+
<Optimization>Disabled</Optimization>
85+
<SDLCheck>true</SDLCheck>
86+
<ConformanceMode>true</ConformanceMode>
87+
</ClCompile>
88+
</ItemDefinitionGroup>
89+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
90+
<ClCompile>
91+
<WarningLevel>Level3</WarningLevel>
92+
<Optimization>MaxSpeed</Optimization>
93+
<FunctionLevelLinking>true</FunctionLevelLinking>
94+
<IntrinsicFunctions>true</IntrinsicFunctions>
95+
<SDLCheck>true</SDLCheck>
96+
<ConformanceMode>true</ConformanceMode>
97+
</ClCompile>
98+
<Link>
99+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
100+
<OptimizeReferences>true</OptimizeReferences>
101+
</Link>
102+
</ItemDefinitionGroup>
103+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
104+
<ClCompile>
105+
<WarningLevel>Level3</WarningLevel>
106+
<Optimization>MaxSpeed</Optimization>
107+
<FunctionLevelLinking>true</FunctionLevelLinking>
108+
<IntrinsicFunctions>true</IntrinsicFunctions>
109+
<SDLCheck>true</SDLCheck>
110+
<ConformanceMode>true</ConformanceMode>
111+
</ClCompile>
112+
<Link>
113+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
114+
<OptimizeReferences>true</OptimizeReferences>
115+
</Link>
116+
</ItemDefinitionGroup>
117+
<ItemGroup>
118+
<ClCompile Include="About1.c" />
119+
</ItemGroup>
120+
<ItemGroup>
121+
<ClInclude Include="resource.h" />
122+
</ItemGroup>
123+
<ItemGroup>
124+
<ResourceCompile Include="About1.rc" />
125+
</ItemGroup>
126+
<ItemGroup>
127+
<Image Include="about1.ico" />
128+
</ItemGroup>
129+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
130+
<ImportGroup Label="ExtensionTargets">
131+
</ImportGroup>
132+
</Project>

‎About1/About1.vcxproj.filters‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="About1.c">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
</ItemGroup>
22+
<ItemGroup>
23+
<ClInclude Include="resource.h">
24+
<Filter>Header Files</Filter>
25+
</ClInclude>
26+
</ItemGroup>
27+
<ItemGroup>
28+
<ResourceCompile Include="About1.rc">
29+
<Filter>Resource Files</Filter>
30+
</ResourceCompile>
31+
</ItemGroup>
32+
<ItemGroup>
33+
<Image Include="about1.ico">
34+
<Filter>Resource Files</Filter>
35+
</Image>
36+
</ItemGroup>
37+
</Project>

‎About1/about1.ico‎

44.4 KB
Binary file not shown.

‎About1/resource.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#define IDM_APP_ABOUT 40001
2+
#define IDC_STATIC -1

‎About1/x64/Debug/About1.res‎

45.2 KB
Binary file not shown.
862 Bytes
Binary file not shown.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /