Examples: DirectX11: fixed handling of unicode character inputs.

This commit is contained in:
ocornut 2015-01-31 23:26:53 +00:00
parent bebd2da1f1
commit 35c0842bcf
2 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>

View File

@ -517,11 +517,11 @@ void UpdateImGui()
int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE, LPWSTR, int) int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE, LPWSTR, int)
{ {
// Register the window class // 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); RegisterClassEx(&wc);
// Create the application's window // 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)) if (!QueryPerformanceFrequency((LARGE_INTEGER *)&ticks_per_second))
return 1; return 1;
@ -532,7 +532,7 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE, LPWSTR, int)
if (InitDeviceD3D(hWnd) < 0) if (InitDeviceD3D(hWnd) < 0)
{ {
CleanupDevice(); CleanupDevice();
UnregisterClass("ImGui Example", wc.hInstance); UnregisterClass(L"ImGui Example", wc.hInstance);
return 1; return 1;
} }
@ -603,7 +603,7 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE, LPWSTR, int)
} }
ImGui::Shutdown(); ImGui::Shutdown();
UnregisterClass("ImGui Example", wc.hInstance); UnregisterClass(L"ImGui Example", wc.hInstance);
return 0; return 0;
} }