From 810c60b6ee053b4b47d6e8759544d59d18a3c0a3 Mon Sep 17 00:00:00 2001 From: Mark Reid Date: Tue, 6 Dec 2022 13:33:53 -0800 Subject: [PATCH] Use DefWindowProcW in win32 examples Fixes the window title from being truncated on calls to Platform_SetWindowTitle. Stops the WM_SETTEXT message that happens when calling setWindowTextW from being interpreted as ascii. --- examples/example_win32_directx10/main.cpp | 2 +- examples/example_win32_directx11/main.cpp | 2 +- examples/example_win32_directx12/main.cpp | 2 +- examples/example_win32_directx9/main.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/example_win32_directx10/main.cpp b/examples/example_win32_directx10/main.cpp index e2ec2f041736..fe5af3a2bfb9 100644 --- a/examples/example_win32_directx10/main.cpp +++ b/examples/example_win32_directx10/main.cpp @@ -240,5 +240,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) ::PostQuitMessage(0); return 0; } - return ::DefWindowProc(hWnd, msg, wParam, lParam); + return ::DefWindowProcW(hWnd, msg, wParam, lParam); } diff --git a/examples/example_win32_directx11/main.cpp b/examples/example_win32_directx11/main.cpp index d2e31c4f96a5..8fd40573544e 100644 --- a/examples/example_win32_directx11/main.cpp +++ b/examples/example_win32_directx11/main.cpp @@ -244,5 +244,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) ::PostQuitMessage(0); return 0; } - return ::DefWindowProc(hWnd, msg, wParam, lParam); + return ::DefWindowProcW(hWnd, msg, wParam, lParam); } diff --git a/examples/example_win32_directx12/main.cpp b/examples/example_win32_directx12/main.cpp index 4de6246e3d45..961d3435813c 100644 --- a/examples/example_win32_directx12/main.cpp +++ b/examples/example_win32_directx12/main.cpp @@ -462,5 +462,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) ::PostQuitMessage(0); return 0; } - return ::DefWindowProc(hWnd, msg, wParam, lParam); + return ::DefWindowProcW(hWnd, msg, wParam, lParam); } diff --git a/examples/example_win32_directx9/main.cpp b/examples/example_win32_directx9/main.cpp index 4c38768fbd29..494a94bd14dc 100644 --- a/examples/example_win32_directx9/main.cpp +++ b/examples/example_win32_directx9/main.cpp @@ -234,5 +234,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) ::PostQuitMessage(0); return 0; } - return ::DefWindowProc(hWnd, msg, wParam, lParam); + return ::DefWindowProcW(hWnd, msg, wParam, lParam); }