diff --git a/Dialogs.aps b/Dialogs.aps
index d31b939..88ed17c 100644
Binary files a/Dialogs.aps and b/Dialogs.aps differ
diff --git a/Dialogs.rc b/Dialogs.rc
index bc28737..9763a82 100644
--- a/Dialogs.rc
+++ b/Dialogs.rc
@@ -123,6 +123,15 @@ BEGIN
END
#endif // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1 ICON "icon1.ico"
#endif // English (Canada) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/G3DTest.vcproj b/G3DTest.vcproj
index 41d451f..79a70d6 100644
--- a/G3DTest.vcproj
+++ b/G3DTest.vcproj
@@ -316,6 +316,10 @@
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
+
+
diff --git a/icon1.ico b/icon1.ico
new file mode 100644
index 0000000..5423a6a
Binary files /dev/null and b/icon1.ico differ
diff --git a/main.cpp b/main.cpp
index 137d5ca..bc935e9 100644
--- a/main.cpp
+++ b/main.cpp
@@ -631,7 +631,8 @@ void Demo::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) {
if(dataModel->name != title)
{
title = dataModel->name;
- app->renderDevice->setCaption("Game \"" + title + "\"");
+ std::string text = "Game \"" + title + "\"";
+ SetWindowText(app->getMainHWND(), text.c_str());
}
CoordinateFrame frame = app->debugCamera.getCoordinateFrame();
@@ -1214,14 +1215,8 @@ int main(int argc, char** argv) {
//_CrtSetBreakAlloc(1279);
GAppSettings settings;
- if(getOSVersion() > 5.0)
- settings.window.defaultIconFilename = GetFileInPath("/content/images/rico.png");
- else
- settings.window.defaultIconFilename = GetFileInPath("/content/images/rico256c.png");
settings.window.resizable = true;
settings.writeLicenseFile = false;
- settings.window.width = 841;
- settings.window.height = 639;
//Using the damned SDL window now
SDLWindow* wnd = new SDLWindow(settings.window);
//wnd->setInputCaptureCount(200);
@@ -1290,6 +1285,10 @@ int main(int argc, char** argv) {
//SetWindowLong(hwnd, GWL_STYLE, WS_VISIBLE | WS_CHILD);
SetWindowLongPtr(hwndMain, GWL_USERDATA, (LONG)&app);
+
+ HICON hicon = (HICON)LoadImage(GetModuleHandleW(NULL), (LPCSTR)MAKEINTRESOURCEW(IDI_ICON1), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR | LR_DEFAULTSIZE);
+ SendMessage(hwndMain, WM_SETICON, ICON_BIG, (LPARAM)hicon);
+
app.run();
return 0;
}
diff --git a/resource.h b/resource.h
index 7259ef5..56d9469 100644
--- a/resource.h
+++ b/resource.h
@@ -4,13 +4,14 @@
//
#define IDD_ABOUT_DIALOG 102
#define IDD_TOOLBOX 103
+#define IDI_ICON1 106
#define IDC_TOOLBOX_BROWSER 1001
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 106
+#define _APS_NEXT_RESOURCE_VALUE 107
#define _APS_NEXT_COMMAND_VALUE 40004
#define _APS_NEXT_CONTROL_VALUE 1002
#define _APS_NEXT_SYMED_VALUE 101