diff --git a/examples/common/entry/entry_windows.cpp b/examples/common/entry/entry_windows.cpp index 204f5e58..1ce2bda2 100644 --- a/examples/common/entry/entry_windows.cpp +++ b/examples/common/entry/entry_windows.cpp @@ -17,6 +17,7 @@ #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 { @@ -259,6 +260,12 @@ namespace entry } break; + case WM_USER_SET_WINDOW_TITLE: + { + SetWindowText(_hwnd, (const char*)_lparam); + } + break; + case WM_USER_TOGGLE_WINDOW_FRAME: { if (m_frame) @@ -586,11 +593,6 @@ namespace entry } } - void setWindowTitle(const char* _title) - { - SetWindowText(m_hwnd, _title); - } - static LRESULT CALLBACK wndProc(HWND _hwnd, UINT _id, WPARAM _wparam, LPARAM _lparam); EventQueue m_eventQueue; @@ -641,7 +643,7 @@ namespace entry void setWindowTitle(const char* _title) { - s_ctx.setWindowTitle(_title); + PostMessage(s_ctx.m_hwnd, WM_USER_SET_WINDOW_TITLE, 0, (LPARAM)_title); } void toggleWindowFrame()