Browse Source

Merge branch 'patch-1' of https://github.com/Gargaj/imgui into Gargaj-patch-1

omar 8 years ago
parent
commit
c36e7fae93
1 changed files with 6 additions and 0 deletions
  1. 6 0
      examples/directx9_example/imgui_impl_dx9.cpp

+ 6 - 0
examples/directx9_example/imgui_impl_dx9.cpp

@@ -177,21 +177,27 @@ IMGUI_API LRESULT ImGui_ImplDX9_WndProcHandler(HWND, UINT msg, WPARAM wParam, LP
     switch (msg)
     {
     case WM_LBUTTONDOWN:
+        SetCapture( hWnd );
         io.MouseDown[0] = true;
         return true;
     case WM_LBUTTONUP:
+        ReleaseCapture();
         io.MouseDown[0] = false;
         return true;
     case WM_RBUTTONDOWN:
+        SetCapture( hWnd );
         io.MouseDown[1] = true;
         return true;
     case WM_RBUTTONUP:
+        ReleaseCapture();
         io.MouseDown[1] = false;
         return true;
     case WM_MBUTTONDOWN:
+        SetCapture( hWnd );
         io.MouseDown[2] = true;
         return true;
     case WM_MBUTTONUP:
+        ReleaseCapture();
         io.MouseDown[2] = false;
         return true;
     case WM_MOUSEWHEEL: