Commit bb3081ad authored by chili's avatar chili
Browse files

custom app icon

parent 3b2e1c50
......@@ -19,6 +19,7 @@
******************************************************************************************/
#include "Window.h"
#include <sstream>
#include "resource.h"
// Window Class Stuff
......@@ -35,12 +36,18 @@ Window::WindowClass::WindowClass() noexcept
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = GetInstance();
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 = static_cast<HICON>(LoadImage(
GetInstance(),MAKEINTRESOURCE( IDI_ICON1 ),
IMAGE_ICON,16,16,0
));
RegisterClassEx( &wc );
}
......
B// Microsoft Visual C++ generated resource script.
......@@ -153,9 +153,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="hw3d.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="chili.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
......
......@@ -41,5 +41,18 @@
<ClInclude Include="ChiliException.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="hw3d.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="chili.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>
\ No newline at end of file
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by hw3d.rc
//
#define IDI_ICON1 101
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#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