diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d103a8..5c15303 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ set(CMAKE_MFC_FLAG 2) option(BUILD_UNICODE "Build with Unicode support" ON) add_executable(Rebuilder WIN32 + res/res.rc src/app.cpp src/app.h src/window.cpp diff --git a/res/mama.ico b/res/mama.ico new file mode 100644 index 0000000..ad82448 Binary files /dev/null and b/res/mama.ico differ diff --git a/res/res.manifest b/res/res.manifest new file mode 100644 index 0000000..7de501f --- /dev/null +++ b/res/res.manifest @@ -0,0 +1,10 @@ + + + + LEGO Island modding tool and launcher. + + + + + + diff --git a/res/res.rc b/res/res.rc new file mode 100644 index 0000000..a83d23f --- /dev/null +++ b/res/res.rc @@ -0,0 +1,2 @@ +IDI_ICON1 ICON DISCARDABLE "mama.ico" +1 24 "res.manifest" diff --git a/src/window.cpp b/src/window.cpp index b656449..c72b3ae 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -11,6 +11,13 @@ CRebuilderWindow::CRebuilderWindow() // Create form Create(NULL, _T("LEGO Island Rebuilder")); + // Set window icon to application icon + TCHAR filename[MAX_PATH]; + GetModuleFileName(NULL, filename, MAX_PATH); + WORD index; + HICON icon = ExtractAssociatedIcon(AfxGetInstanceHandle(), filename, &index); + SetIcon(icon, TRUE); + // Get default Win32 dialog font m_fDialogFont.CreateStockObject(DEFAULT_GUI_FONT);