Add an icon file (ugly, but at least it's not the default anymore).

And add the manifest that gets us visual styles on the controls
under Win32.

[git-p4: depot-paths = "//depot/solvespace/": change = 1844]
solver
Jonathan Westhues 2008-07-18 01:50:52 -08:00
parent 222007f3d8
commit a783f14eff
5 changed files with 41 additions and 4 deletions

View File

@ -36,6 +36,8 @@ SSOBJS = $(OBJDIR)\solvespace.obj \
$(OBJDIR)\generate.obj \ $(OBJDIR)\generate.obj \
$(OBJDIR)\export.obj \ $(OBJDIR)\export.obj \
RES = $(OBJDIR)\resource.res
LIBS = user32.lib gdi32.lib comctl32.lib advapi32.lib opengl32.lib glu32.lib \ LIBS = user32.lib gdi32.lib comctl32.lib advapi32.lib opengl32.lib glu32.lib \
extlib\libpng.lib extlib\zlib.lib extlib\libpng.lib extlib\zlib.lib
@ -47,8 +49,8 @@ all: $(OBJDIR)/solvespace.exe
clean: clean:
rm -f obj/* rm -f obj/*
$(OBJDIR)/solvespace.exe: $(SSOBJS) $(W32OBJS) $(FREEZE) $(OBJDIR)/solvespace.exe: $(SSOBJS) $(W32OBJS) $(FREEZE) $(RES)
@$(CC) $(DEFINES) $(CFLAGS) -Fe$(OBJDIR)/solvespace.exe $(SSOBJS) $(W32OBJS) $(FREEZE) $(LIBS) @$(CC) $(DEFINES) $(CFLAGS) -Fe$(OBJDIR)/solvespace.exe $(SSOBJS) $(W32OBJS) $(FREEZE) $(RES) $(LIBS)
editbin /nologo /STACK:8388608 $(OBJDIR)/solvespace.exe editbin /nologo /STACK:8388608 $(OBJDIR)/solvespace.exe
@echo solvespace.exe @echo solvespace.exe
@ -60,3 +62,8 @@ $(W32OBJS): win32/$(@B).cpp $(HEADERS)
$(FREEZE): ..\common\win32\$(@B).cpp $(HEADERS) $(FREEZE): ..\common\win32\$(@B).cpp $(HEADERS)
@$(CC) $(CFLAGS) $(DEFINES) -c -Fo$(OBJDIR)/$(@B).obj ..\common\win32\$(@B).cpp @$(CC) $(CFLAGS) $(DEFINES) -c -Fo$(OBJDIR)/$(@B).obj ..\common\win32\$(@B).cpp
$(RES): win32/$(@B).rc icon.ico
rc win32/$(@B).rc
mv win32/$(@B).res $(OBJDIR)/$(@B).res

BIN
icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

22
win32/manifest.xml Normal file
View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="JonathanWesthues.3dCAD.MechSketch"
type="win32"
/>
<description>Parametric 3d CAD tool.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

6
win32/resource.rc Normal file
View File

@ -0,0 +1,6 @@
// we need a manifest if we want visual styles; put in numbers since somethings a bit screwy
// with my SDK install (I don't think I've got *.rh right)
1 24 "manifest.xml"
4000 ICON "../icon.ico"

View File

@ -915,8 +915,10 @@ static void CreateMainWindows(void)
wc.lpszClassName = "GraphicsWnd"; wc.lpszClassName = "GraphicsWnd";
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hIcon = NULL; wc.hIcon = (HICON)LoadImage(Instance, MAKEINTRESOURCE(4000),
wc.hIconSm = NULL; IMAGE_ICON, 32, 32, 0);
wc.hIconSm = (HICON)LoadImage(Instance, MAKEINTRESOURCE(4000),
IMAGE_ICON, 16, 16, 0);
if(!RegisterClassEx(&wc)) oops(); if(!RegisterClassEx(&wc)) oops();
HMENU top = CreateGraphicsWindowMenus(); HMENU top = CreateGraphicsWindowMenus();