[UXTHEME] -Set cbSize field of WINDOWINFO before calling GetWindowInfo. CORE-12776
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 19 Feb 2017 11:41:23 +0000 (11:41 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 19 Feb 2017 11:41:23 +0000 (11:41 +0000)
svn path=/trunk/; revision=73838

reactos/dll/win32/uxtheme/nonclient.c

index c91ed43..3c3da3e 100644 (file)
@@ -851,6 +851,7 @@ DefWndNCHitTest(HWND hWnd, POINT Point)
     POINT ClientPoint;
     WINDOWINFO wi;
 
+    wi.cbSize = sizeof(wi);
     GetWindowInfo(hWnd, &wi);
 
     if (!PtInRect(&wi.rcWindow, Point))
@@ -1185,6 +1186,7 @@ HRESULT WINAPI DrawNCPreview(HDC hDC,
     if (!context.theme)
         return E_FAIL;
     context.Active = TRUE;
+    context.wi.cbSize = sizeof(context.wi);
     if (!GetWindowInfo(hwndDummy, &context.wi))
         return E_FAIL;
     context.wi.dwStyle |= WS_VISIBLE;