Commit 036de6e5 authored by Alexandre Julliard's avatar Alexandre Julliard

Replaced GetDC by CreateDC.

parent a660c790
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "enhmetafiledrv.h" #include "enhmetafiledrv.h"
#include "wine/winestring.h" #include "wine/winestring.h"
#include "debugtools.h" #include "debugtools.h"
#include "winuser.h"
#include <string.h> #include <string.h>
...@@ -248,7 +247,7 @@ HDC WINAPI CreateEnhMetaFileW( ...@@ -248,7 +247,7 @@ HDC WINAPI CreateEnhMetaFileW(
) )
{ {
DC *dc; DC *dc;
HDC hRefDC = hdc ? hdc : GetDC(0); /* If no ref, use current display */ HDC hRefDC = hdc ? hdc : CreateDCA("DISPLAY",NULL,NULL,NULL); /* If no ref, use current display */
EMFDRV_PDEVICE *physDev; EMFDRV_PDEVICE *physDev;
HFILE hFile; HFILE hFile;
DWORD size = 0, length = 0; DWORD size = 0, length = 0;
...@@ -336,7 +335,7 @@ HDC WINAPI CreateEnhMetaFileW( ...@@ -336,7 +335,7 @@ HDC WINAPI CreateEnhMetaFileW(
} }
if( !hdc ) if( !hdc )
ReleaseDC( 0, hRefDC ); DeleteDC( hRefDC );
TRACE("returning %04x\n", dc->hSelf); TRACE("returning %04x\n", dc->hSelf);
return dc->hSelf; return dc->hSelf;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment