add an icon to MS Windows VC exe

This commit is contained in:
Holger Vogt 2018-12-01 00:02:37 +01:00
parent 7f3f46ebea
commit 9f40c2b584
5 changed files with 21 additions and 1 deletions

View File

@ -862,7 +862,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCm
hwMainClass.cbClsExtra = 0; hwMainClass.cbClsExtra = 0;
hwMainClass.cbWndExtra = 0; hwMainClass.cbWndExtra = 0;
hwMainClass.hInstance = hInst; hwMainClass.hInstance = hInst;
hwMainClass.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(1)); hwMainClass.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(101));
hwMainClass.hCursor = LoadCursor(NULL, IDC_ARROW); hwMainClass.hCursor = LoadCursor(NULL, IDC_ARROW);
hwMainClass.hbrBackground = GetStockObject(LTGRAY_BRUSH); hwMainClass.hbrBackground = GetStockObject(LTGRAY_BRUSH);
hwMainClass.lpszMenuName = NULL; hwMainClass.lpszMenuName = NULL;

BIN
visualc/ngspice.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

16
visualc/resource.h Normal file
View File

@ -0,0 +1,16 @@
//{{NO_DEPENDENCIES}}
// Von Microsoft Visual C++ generierte Includedatei.
// Verwendet durch vngspice.rc
//
#define IDI_ICON1 101
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 104
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

BIN
visualc/vngspice.rc Normal file

Binary file not shown.

View File

@ -1281,6 +1281,7 @@
<ClInclude Include=".\src\include\stdint.h" /> <ClInclude Include=".\src\include\stdint.h" />
<ClInclude Include=".\tmp-bison\inpptree-parser.h" /> <ClInclude Include=".\tmp-bison\inpptree-parser.h" />
<ClInclude Include=".\tmp-bison\parse-bison.h" /> <ClInclude Include=".\tmp-bison\parse-bison.h" />
<ClInclude Include="resource.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="..\src\frontend\parse-bison.y;..\src\spicelib\parser\inpptree-parser.y"> <CustomBuild Include="..\src\frontend\parse-bison.y;..\src\spicelib\parser\inpptree-parser.y">
@ -2630,6 +2631,9 @@
<ClCompile Include=".\src\msvc-compat.c" /> <ClCompile Include=".\src\msvc-compat.c" />
<ClCompile Include=".\tmp-bison\parse-bison.c" /> <ClCompile Include=".\tmp-bison\parse-bison.c" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="vngspice.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>