diff --git a/examples/common/entry/entry.cpp b/examples/common/entry/entry.cpp index fb340142..0ee14f37 100644 --- a/examples/common/entry/entry.cpp +++ b/examples/common/entry/entry.cpp @@ -134,6 +134,8 @@ namespace entry inputAddBindings("bindings", s_bindings); + entry::setWindowTitle(bx::baseName(_argv[0])); + int32_t result = ::_main_(_argc, _argv); #if BX_CONFIG_CRT_FILE_READER_WRITER diff --git a/examples/common/entry/entry_windows.cpp b/examples/common/entry/entry_windows.cpp index 1ce2bda2..0a35fb70 100644 --- a/examples/common/entry/entry_windows.cpp +++ b/examples/common/entry/entry_windows.cpp @@ -17,7 +17,6 @@ #define WM_USER_SET_WINDOW_SIZE (WM_USER+0) #define WM_USER_TOGGLE_WINDOW_FRAME (WM_USER+1) #define WM_USER_MOUSE_LOCK (WM_USER+2) -#define WM_USER_SET_WINDOW_TITLE (WM_USER+3) namespace entry { @@ -260,12 +259,6 @@ namespace entry } break; - case WM_USER_SET_WINDOW_TITLE: - { - SetWindowText(_hwnd, (const char*)_lparam); - } - break; - case WM_USER_TOGGLE_WINDOW_FRAME: { if (m_frame) @@ -643,7 +636,7 @@ namespace entry void setWindowTitle(const char* _title) { - PostMessage(s_ctx.m_hwnd, WM_USER_SET_WINDOW_TITLE, 0, (LPARAM)_title); + SetWindowTextA(s_ctx.m_hwnd, _title); } void toggleWindowFrame()