Skip to content

Commit

Permalink
added icons
Browse files Browse the repository at this point in the history
  • Loading branch information
dvsku committed Dec 30, 2022
1 parent c95bbb6 commit f35181f
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 0 deletions.
Binary file added src/dvsku_toolkit_gui/appicon.ico
Binary file not shown.
2 changes: 2 additions & 0 deletions src/dvsku_toolkit_gui/dvsku_toolkit_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine,
if (window == NULL)
return 1;

SetClassLongPtr(glfwGetWin32Window(window), GCLP_HICON, (LONG_PTR)LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(101)));

glfwMakeContextCurrent(window);
glfwSwapInterval(1); // Enable vsync

Expand Down
71 changes: 71 additions & 0 deletions src/dvsku_toolkit_gui/dvsku_toolkit_gui.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (United States) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE
BEGIN
"resource.h\0"
END

2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END

3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END

#endif // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON "appicon.ico"

#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//


/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

7 changes: 7 additions & 0 deletions src/dvsku_toolkit_gui/dvsku_toolkit_gui.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,19 @@
<ClInclude Include="lib\imgui\imgui.h" />
<ClInclude Include="lib\imgui\imgui_internal.h" />
<ClInclude Include="lib\imgui\misc\cpp\imgui_stdlib.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="views\tab_base.h" />
<ClInclude Include="views\tab_decrypt.h" />
<ClInclude Include="views\tab_encrypt.h" />
<ClInclude Include="views\tab_pack.h" />
<ClInclude Include="views\tab_unpack.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="dvsku_toolkit_gui.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="appicon.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
13 changes: 13 additions & 0 deletions src/dvsku_toolkit_gui/dvsku_toolkit_gui.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,18 @@
<ClInclude Include="views\tab_base.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="dvsku_toolkit_gui.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="appicon.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>
16 changes: 16 additions & 0 deletions src/dvsku_toolkit_gui/resource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by dvsku_toolkit_gui.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

0 comments on commit f35181f

Please sign in to comment.