Commit 8ea2f717 authored by Clark Lin's avatar Clark Lin
Browse files

add icon

parent 80fa0592
B// Microsoft Visual C++ generated resource script.
......@@ -145,9 +145,16 @@
<ItemGroup>
<ClInclude Include="ChiliException.h" />
<ClInclude Include="ChiliWin.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="Window.h" />
<ClInclude Include="WindowsMessageMap.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="StudyDx.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="oasis.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
......
......@@ -41,5 +41,18 @@
<ClInclude Include="WindowsMessageMap.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="StudyDx.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="oasis.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -28,7 +28,7 @@ int CALLBACK WinMain(
{
try
{
Window wnd(800, 300, "Donkey Fart Box");
Window wnd(800, 600, "Oasis Demo");
MSG msg;
BOOL gResult;
......
......@@ -19,6 +19,7 @@
******************************************************************************************/
#include "Window.h"
#include <sstream>
#include "resource.h"
// Window Class Stuff
......@@ -35,12 +36,34 @@ Window::WindowClass::WindowClass() noexcept
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = GetInstance();
wc.hIcon = nullptr;
// wc.hIcon = nullptr;
// 指定图标
wc.hIcon = static_cast<HICON>(
LoadImage(
GetInstance(),
MAKEINTRESOURCE(IDI_ICON1),
IMAGE_ICON,
32,
32,
0));
wc.hCursor = nullptr;
wc.hbrBackground = nullptr;
wc.lpszMenuName = nullptr;
wc.lpszClassName = GetName();
wc.hIconSm = nullptr;
// wc.hIconSm = nullptr;
// 指定小图标
wc.hIconSm = static_cast<HICON>(
LoadImage(
GetInstance(),
MAKEINTRESOURCE(IDI_ICON1),
IMAGE_ICON,
16,
16,
0));
RegisterClassEx( &wc );
}
......
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by StudyDx.rc
//
#define IDI_ICON1 107
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 108
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment