Examples: DirectX9/11: Removed assumption about Unicode build in example main.cpp (#399)

This commit is contained in:
ocornut
2015-11-22 21:23:56 +00:00
parent dc86a8a0bf
commit 83e6cfbec0
2 changed files with 11 additions and 9 deletions

View File

@ -6,6 +6,7 @@
#include <d3dcompiler.h>
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <tchar.h>
// Data
static ID3D11Device* g_pd3dDevice = NULL;
@ -131,15 +132,15 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
int main(int, char**)
{
// Create application window
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, LoadCursor(NULL, IDC_ARROW), NULL, NULL, L"ImGui Example", NULL };
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, LoadCursor(NULL, IDC_ARROW), NULL, NULL, _T("ImGui Example"), NULL };
RegisterClassEx(&wc);
HWND hwnd = CreateWindow(L"ImGui Example", L"ImGui DirectX11 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
HWND hwnd = CreateWindow(_T("ImGui Example"), _T("ImGui DirectX11 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
// Initialize Direct3D
if (CreateDeviceD3D(hwnd) < 0)
{
CleanupDeviceD3D();
UnregisterClass(L"ImGui Example", wc.hInstance);
UnregisterClass(_T("ImGui Example"), wc.hInstance);
return 1;
}
@ -219,7 +220,7 @@ int main(int, char**)
ImGui_ImplDX11_Shutdown();
CleanupDeviceD3D();
UnregisterClass(L"ImGui Example", wc.hInstance);
UnregisterClass(_T("ImGui Example"), wc.hInstance);
return 0;
}