From b4fd216bd203da625083301d4af600025a29d2bf Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 30 Nov 2014 18:02:08 +0000 Subject: [PATCH] DirectX9/DirectX11 example: fixed window initially showing an hourglass cursor. --- examples/directx11_example/main.cpp | 4 ++-- examples/directx9_example/main.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp index 84d86739..0d4cec29 100644 --- a/examples/directx11_example/main.cpp +++ b/examples/directx11_example/main.cpp @@ -299,7 +299,7 @@ void CleanupDevice() if (g_pd3dDevice) g_pd3dDevice->Release(); } -LRESULT WINAPI MsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { ImGuiIO& io = ImGui::GetIO(); switch (msg) @@ -471,7 +471,7 @@ void UpdateImGui() int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE, LPWSTR, int) { // Register the window class - WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, MsgProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, "ImGui Example", NULL }; + WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, LoadCursor(NULL, IDC_ARROW), NULL, NULL, "ImGui Example", NULL }; RegisterClassEx(&wc); // Create the application's window diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp index 047874c4..dc86c3c0 100644 --- a/examples/directx9_example/main.cpp +++ b/examples/directx9_example/main.cpp @@ -135,7 +135,7 @@ void CleanupDevice() if (g_pD3D) g_pD3D->Release(); } -LRESULT WINAPI MsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { ImGuiIO& io = ImGui::GetIO(); switch (msg) @@ -254,7 +254,7 @@ void UpdateImGui() int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE, LPWSTR, int) { // Register the window class - WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, MsgProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, L"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