From: Vadim Zeitlin Date: Thu, 21 Mar 2002 18:59:36 +0000 (+0000) Subject: HDC leak fix X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2b8646e07d9eefb944b2b0e8aa9a264847b0b73a?ds=sidebyside HDC leak fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/glcanvas.cpp b/src/msw/glcanvas.cpp index 97cb556e37..3d3fc51624 100644 --- a/src/msw/glcanvas.cpp +++ b/src/msw/glcanvas.cpp @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: glcanvas.cpp +// Name: src/msw/glcanvas.cpp // Purpose: wxGLCanvas, for using OpenGL with wxWindows under MS Windows // Author: Julian Smart // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -725,7 +725,7 @@ bool wxGLApp::InitGLVisual(int *attribList) AdjustPFDForAttributes(pfd, attribList); // use DC for whole (root) screen, since no windows have yet been created - pixelFormat = ChoosePixelFormat((HDC) ::GetDC(NULL), &pfd); + pixelFormat = ChoosePixelFormat(ScreenHDC(), &pfd); if (pixelFormat == 0) { wxLogError(_("Failed to initialize OpenGL"));