Examples: Win32: Using wc.lpszClassName instead of duplicating the literal. + tweak README format.

This commit is contained in:
omar
2019-01-17 18:04:35 +01:00
parent b8020032f9
commit 295ada0364
5 changed files with 25 additions and 25 deletions

View File

@ -99,13 +99,13 @@ int main(int, char**)
// Create application window
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
RegisterClassEx(&wc);
HWND hwnd = CreateWindow(_T("ImGui Example"), _T("Dear ImGui DirectX11 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
HWND hwnd = CreateWindow(wc.lpszClassName, _T("Dear ImGui DirectX11 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
// Initialize Direct3D
if (CreateDeviceD3D(hwnd) < 0)
{
CleanupDeviceD3D();
UnregisterClass(_T("ImGui Example"), wc.hInstance);
UnregisterClass(wc.lpszClassName, wc.hInstance);
return 1;
}
@ -222,7 +222,7 @@ int main(int, char**)
CleanupDeviceD3D();
DestroyWindow(hwnd);
UnregisterClass(_T("ImGui Example"), wc.hInstance);
UnregisterClass(wc.lpszClassName, wc.hInstance);
return 0;
}