From 35c0842bcf7b72039dfbe14bc9d8d972c5d1ac94 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sat, 31 Jan 2015 23:26:53 +0000 Subject: [PATCH] Examples: DirectX11: fixed handling of unicode character inputs. --- examples/directx11_example/directx11_example.vcxproj | 2 +- examples/directx11_example/main.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/directx11_example/directx11_example.vcxproj b/examples/directx11_example/directx11_example.vcxproj index 5f731ac7d..92ad83aad 100644 --- a/examples/directx11_example/directx11_example.vcxproj +++ b/examples/directx11_example/directx11_example.vcxproj @@ -18,7 +18,7 @@ Application true - MultiByte + Unicode Application diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp index 1a87d3c13..ce6fbb23e 100644 --- a/examples/directx11_example/main.cpp +++ b/examples/directx11_example/main.cpp @@ -517,11 +517,11 @@ void UpdateImGui() int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE, LPWSTR, int) { // Register the window class - WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, LoadCursor(NULL, IDC_ARROW), NULL, NULL, "ImGui Example", NULL }; + WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, LoadCursor(NULL, IDC_ARROW), NULL, NULL, L"ImGui Example", NULL }; RegisterClassEx(&wc); // Create the application's window - hWnd = CreateWindow("ImGui Example", "ImGui DirectX11 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL); + hWnd = CreateWindow(L"ImGui Example", L"ImGui DirectX11 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL); if (!QueryPerformanceFrequency((LARGE_INTEGER *)&ticks_per_second)) return 1; @@ -532,7 +532,7 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE, LPWSTR, int) if (InitDeviceD3D(hWnd) < 0) { CleanupDevice(); - UnregisterClass("ImGui Example", wc.hInstance); + UnregisterClass(L"ImGui Example", wc.hInstance); return 1; } @@ -603,7 +603,7 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE, LPWSTR, int) } ImGui::Shutdown(); - UnregisterClass("ImGui Example", wc.hInstance); + UnregisterClass(L"ImGui Example", wc.hInstance); return 0; }