diff --git a/editor/appicon.ico b/editor/appicon.ico new file mode 100644 index 0000000..7f4c335 Binary files /dev/null and b/editor/appicon.ico differ diff --git a/editor/editor.cpp b/editor/editor.cpp index 19a92c4..5f94395 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -518,20 +518,20 @@ static LRESULT CALLBACK mainWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA static ATOM registerMainWindowClass(HINSTANCE hInstance) { WNDCLASSEXW wc; - + wc.cbSize = sizeof(wc); wc.style = 0; wc.lpfnWndProc = mainWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); + wc.hIcon = LoadIcon(hInstance, IDI_APPLICATION); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH)0; wc.lpszMenuName = MAKEINTRESOURCEW(IDR_MENU); wc.lpszClassName = mainWindowClassName; - wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); - + wc.hIconSm = wc.hIcon; + return RegisterClassExW(&wc); } diff --git a/editor/editor.rc b/editor/editor.rc index e751f87..ff8b5ac 100644 --- a/editor/editor.rc +++ b/editor/editor.rc @@ -162,6 +162,15 @@ BEGIN END #endif // APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APPLICATION ICON "appicon.ico" #endif // Norwegian (Bokmal) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/editor/editor.vcproj b/editor/editor.vcproj index d2a1cf0..319ba53 100644 --- a/editor/editor.vcproj +++ b/editor/editor.vcproj @@ -250,6 +250,10 @@ RelativePath=".\editor.rc" > + +