diff options
Diffstat (limited to 'src/widgets/styles/qwindowsxpstyle.cpp')
-rw-r--r-- | src/widgets/styles/qwindowsxpstyle.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp index 2fbc40dc11..c0ea725b7b 100644 --- a/src/widgets/styles/qwindowsxpstyle.cpp +++ b/src/widgets/styles/qwindowsxpstyle.cpp @@ -451,8 +451,11 @@ HBITMAP QWindowsXPStylePrivate::buffer(int w, int h) w = qMax(bufferW, w); h = qMax(bufferH, h); - if (!bufferDC) - bufferDC = CreateCompatibleDC(qt_win_display_dc()); + if (!bufferDC) { + HDC displayDC = GetDC(0); + bufferDC = CreateCompatibleDC(displayDC); + ReleaseDC(0, displayDC); + } // Define the header BITMAPINFO bmi; |