summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/activeqt/container/qaxwidget.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp
index bdc6e1d..8c74159 100644
--- a/src/activeqt/container/qaxwidget.cpp
+++ b/src/activeqt/container/qaxwidget.cpp
@@ -1798,7 +1798,8 @@ void QAxHostWidget::paintEvent(QPaintEvent*)
pm.fill();
HBITMAP hBmp = qt_pixmapToWinHBITMAP(pm);
- HDC hBmp_hdc = CreateCompatibleDC(qt_win_display_dc());
+ const HDC displayDc = GetDC(0);
+ HDC hBmp_hdc = CreateCompatibleDC(displayDc);
HGDIOBJ old_hBmp = SelectObject(hBmp_hdc, hBmp);
RECTL bounds;
@@ -1818,6 +1819,7 @@ void QAxHostWidget::paintEvent(QPaintEvent*)
SelectObject(hBmp_hdc, old_hBmp);
DeleteObject(hBmp);
DeleteDC(hBmp_hdc);
+ ReleaseDC(0, displayDc);
}
/*!